Are we allowed to modify the code for the FX/Water shader if we don’t have a Pro license? I found the source code on Github but I’m not sure whether we’re supposed to have access to the code without Pro.
Does anyone know what the policy is on this? I’m asking because apparently the source code is only included in Unity Pro, or at least I can’t find it in my copy. But someone posted the code online, so I’m wondering whether I can use and modify it.
The pro water uses rendertexture for the reflection (that was a pro feature in unity 4.x and before).
Yes you can modify the code even with the free / personal edition without any problem.
The water shader and script is included in the Environment package (Assets → Import Package ->Environment)
Thank you. How would I modify it to get the depth, so I can change the refraction tint color based on the depth (so deeper objects are realistically darker) ? Would I need to use _CameraDepthTexture (e.g.
half depth = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screenPos)); )
[Later Edit: I’ll answer my own question in case someone else is trying to do the same thing: yes, you use (_CameraDepthTexture ]