fix semi-transparent (water) rendering

This commit is contained in:
2022-01-29 22:29:27 +08:00
parent fea09c5012
commit 444697b205
11 changed files with 212 additions and 132 deletions

View File

@@ -14,6 +14,7 @@ layout (location = 3) in float light;
out vec3 fragPosWorld;
out float fragPosLightspaceZ;
out float fragDepthNDC;
out vec2 fragTexCoord;
out vec3 fragNormal;
out float fragLight;
@@ -25,6 +26,7 @@ void main() {
fragLight = light;
gl_Position = projection * view * model * vec4(vert, 1);
fragDepthNDC = gl_Position.z / gl_Position.w;
vec4 pos4 = model * vec4(vert, 1);
fragPosWorld = pos4.xyz / pos4.w;