Hello,
I am trying to write a shader to where I have a cube that always sits directly in front of my camera (using a c# script), and the cube’s texture has a transparent vertex-lit shader attached that uses ‘IN.screenPos’ (to cover the entire screen with the cube’s texture at a texture scale of (1,1) no matter HOW big my cube is). What I want the texture of the cube to be is a ‘target texture’ from another camera. This way, I can ‘fade in’ and ‘fade out’ my cube (to make it LOOK like I am slowly ‘fading’ from one camera to another). So far, my shader and cube works, BUT depending on where my original camera is pointing, it determines how ‘light’ or ‘dark’ the cube is. I turned off ‘cast shadows’ and ‘receive shadows’, so, the ONLY thing I can think of that is causing this is the fact that individual objects itself HAVE their own shadows unless told otherwise by a shader program. I WOULD set it to a built-in vertex-lit shader that COMES with Unity, but, that would defeat my goal to use IN.screenPos. How can I program my shader to NOT have objects that use it have its own shadow?
Thank you.