fix semi-transparent (water) rendering
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user