Hello guys, hello girls!
I have a problem with my depth texture while rendering with replaced shaders. The quality of the resulting depth texture is bad, what means that I have “stripes” in the texture instead of smooth values.
In my code I do this:
RenderTexture depthMap = new RenderTexture(bufferSize, bufferSize, 32, RenderTextureFormat.ARGB32);
//[...]
Cam.targetTexture = depthMap;
Cam.RenderWithShader(Shader.Find("Hidden/Camera-DepthTexture"), null);
Although the color depth is set to 32 bit, the precision stays low. (At least when I draw the texture in the GUI)
But I need high precision because I pass the texture to another shader to work with it.
How can I fix it? Would be great if someone knew something !!
valle