render: SSAO
This commit is contained in:
@@ -4,7 +4,7 @@ uniform sampler2D tex;
|
||||
|
||||
in vec3 fragPosWorld;
|
||||
in float fragPosLightspaceZ;
|
||||
in float fragDepthNDC;
|
||||
in float fragDepthView;
|
||||
in vec2 fragTexCoord;
|
||||
in vec3 fragNormal;
|
||||
in float fragLight;
|
||||
@@ -19,9 +19,9 @@ const float gamma = 2.2;
|
||||
void main() {
|
||||
|
||||
outputPosition.xyz = fragPosWorld;
|
||||
outputPosition.w = fragPosLightspaceZ;
|
||||
outputPosition.w = fragDepthView;
|
||||
outputNormal.xyz = fragNormal;
|
||||
outputNormal.w = fragDepthNDC;
|
||||
outputNormal.w = fragPosLightspaceZ;
|
||||
outputColor = texture(tex, fragTexCoord);
|
||||
outputColor = vec4(pow(outputColor.rgb, vec3(gamma)), outputColor.a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user