- Home /
Water Shader: Everything broke, but I only changed settings trying to fix it?
Good morning!
I made a water shader by smashing two shader tutorials together. I thought it turned out quite pretty. It makes use of transparency, and the depth function. It was made in LWRP's Shader Graph.
https://i.imgur.com/odS04Ty.png
Then... Something happened? These next few pictures are on the same shader, but different color and scale settings for an 'ocean'. The first one is the editor view. It was late at night, so I gave up and went to bed.
https://i.imgur.com/HxukoTq.png
The next day, I found people were talking about cascades and settings like that to fix it, so I tried. Nothing changed. Then I had a crash, and came back to this:
https://i.imgur.com/1tA27gH.png
If I got too close to it with any camera, this happened:
https://i.imgur.com/Uk3pZcv.png
I updated Unity thinking that might fix it, but now... now everything is like this: https://i.imgur.com/nfLHoQT.png
This last picture I put the 'Lake' material from the first picture on it, thinking making I messed with the 'Ocean' settings too much. But it's horrible too. The worst part is it doesn't matter if its in build, run, or editor, all of it is horrible looking like this.
I didn't change the shader settings outside of scaling and color (which is set per material). When changing the shadow cascade settings didn't work, I reverted them back to normal. Progressive CPU/GPU and Enlighten both have this issue. Making a new directional light did nothing, other than make it dark for a minute (as I deleted, tried, made a new one, and tried again). Changing the light's bias did nothing. Changing the camera's clipping panes did nothing. An older version has the water in the first picture, but still has the issues in all but the last picture. Changing cascades literally did nothing for this issue. No shadows made the awkward shadows dark instead of gone. Generate lighting did nothing. Changing Mixed Lighting settings did nothing. Changing the Mesh renderer lighting settings did nothing (except turn it off when set to Shadows only ;P).
I don't know what else to try, but I would greatly appreciate help as I feel like this is going to affect anything with transparent shaders.
Edit// I copied over the LWRP settings from the semi-working one, now I have this mess:
https://i.imgur.com/rXjb3xF.png
There's three weird shadows. The weird shadow from the terrain and player. The weird shadow from the camera. And the weird brightness on the sides. The middle blue is how it's supposed to look like...
https://i.imgur.com/MRqm8LG.png
More weirdness, this angle from the editor camera vs the play camera from earlier.