Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Densevoid |
How to check the distance from the camera to the object in the shader?
I suppose to do this through the uniform and sending the value through the processing script. But maybe there is a way to do this completely with the shader code?
Maybe you ought to remove that gdscript tag since this isn’t really concerning gdscript. Also when you say distance from object to camera do you also mean distance between camera and fragment, or one constant value for the object.
SIsilicon | 2018-08-06 02:18
Constant value.
Densevoid | 2018-08-10 06:52