Hello!
I am trying to do a shader that serves as a “lens” on the camera. I want to change the position of each pixel via a function.
Don’t know whether it is achievable in vertex shader written in CG.
The way I connect the shader and the camera is OnRenderImage:
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, destination, distortionMaterial);
}
Or only GLSL can achieve it?