fix uninitialized shader variable

This commit is contained in:
2022-02-21 14:01:09 +08:00
parent 4a9afb4246
commit 203b77c32f
4 changed files with 19 additions and 15 deletions

View File

@@ -7,9 +7,9 @@ in vec2 fragPosScreen;
out vec4 outputColor;
void main() {
vec4 texColor = texture(tex, fragPosScreen);
vec4 texColor = texture(tex, fragPosScreen);
if (texColor.a < 1e-4)
discard;
outputColor = vec4(pow(texColor.rgb / exposure, vec3(1.0/gamma)), 1.0f);
outputColor = vec4(pow(texColor.rgb * exposure, vec3(1.0/gamma)), 1.0f);
}