If you look at the water glsl, the final fragcolor in PS() is:
gl_FragColor = vec4(GetFog(finalColor, GetFogFactor(vEyeVec.w)), 1.0);
where alpha = 1.0.
How is the water transparent?
If you look at the water glsl, the final fragcolor in PS() is:
gl_FragColor = vec4(GetFog(finalColor, GetFogFactor(vEyeVec.w)), 1.0);
where alpha = 1.0.
How is the water transparent?
Water is not transparent. Shader mix two textures: rendered scene from main camera (refractColor) and rendered scene from reflection camera (reflectColor).
You can write for test
gl_FragColor = vec4(1.0);
[quote=“Lumak”]but you can also see through the water and see the terrain.
[/quote]
it is texture on water plane
Thanks, didn’t see that. It makes sense now.