Reputation: 1
I have a problem with water refraction. It refracts everything, even the objects above the water. I know why this is happening, but I can’t find a way to solve this problem. I tried to check if a fragment is under the surface, but still doesn’t work. I think the shader thinks that all objects are under the surface. If anyone knows a fix, a tip, or whatever I will be happy to hear it because I am very very stuck. Thank you! :))
P.S. I am writing a surface shader and not using shader graph
Here's the shader code: [Shader code](https://pastebin.com/0m52rqc6)
I tried to check if a fragment is under the surface but it doesn't work. It still refracts the whole scene
Upvotes: -1
Views: 33