Open Einheit-101 opened 5 years ago
This is due to the rending order.
If what CodyJL said is right, maybe using setWaterDrawnLast makes a difference?
No! Effects are still in front of water with setWaterDrawnLast(true)
Creating a simple shader and adding this code into the main pass does actually solve this issue: ZEnable = true; ZWriteEnable = true; ZFunc = 4;
...however since water is now writing to depth buffer, it causes zfighting with anything that is close and planar to it (including boat wake and other water effects).
I think the final solution would be applying another shader to these water effects (duh...) that gives them so much depth bias that they will draw on top of the water surface...
Can you check if that shader fixes the bug of not being able to see water through car windows @Einheit-101
Sure. It doesnt fix the issue. Default GTA Water with simple zWriteEnable shader:
Water still not visible through car window, but water surface can be illuminated by dynamic lighting
Complex water shader with zWriteEnable = same.
Water doesnt just refuse to render through car windows, actually it doesnt render through vehicles at all.
Alright, reconfirms my belief that SAs rendering order is crap.
setWaterDrawnLast on top of this shader doesnt work either. It looks like the water is simply culled away. Yes, GTA render order is messed up.
Describe the bug This old rendering bug is annoying for a long time now. Effects ignore the water in front of them.
To reproduce
Expected behaviour Effects should render correctly
Screenshots
Multi Theft Auto v1.5.6-release-15932 (Windows)
Additional context Is there maybe a shader that can be applied to effects textures that fixes this issue?