HDR output buffer (WIP)
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
#version 330
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform float gamma, exposure;
|
||||
|
||||
in vec2 fragPosScreen;
|
||||
out vec4 outputColor;
|
||||
|
||||
void main() {
|
||||
outputColor = 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user