fixed bad hdr and bloom too strong
This commit is contained in:
parent
698ce5b62a
commit
fb8ff13751
@ -21,7 +21,6 @@ void main(void) {
|
|||||||
bloom += texture(blurSampler2, gl_FragCoord.xy/4).xyz;
|
bloom += texture(blurSampler2, gl_FragCoord.xy/4).xyz;
|
||||||
bloom += texture(blurSampler3, gl_FragCoord.xy/8).xyz;
|
bloom += texture(blurSampler3, gl_FragCoord.xy/8).xyz;
|
||||||
|
|
||||||
color += bloom;
|
outColor = vec4(color + bloom/4, 1.0);
|
||||||
outColor = vec4(color + bloom*0.02f, 1.0);
|
|
||||||
minMaxMean = vec3(0.2126*color.r + 0.7152*color.g + 0.0722*color.b);
|
minMaxMean = vec3(0.2126*color.r + 0.7152*color.g + 0.0722*color.b);
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,9 @@ void main(void) {
|
|||||||
ivec2 pos = ivec2(gl_FragCoord.xy);
|
ivec2 pos = ivec2(gl_FragCoord.xy);
|
||||||
vec3 color = texelFetch(colorSampler, pos).xyz;
|
vec3 color = texelFetch(colorSampler, pos).xyz;
|
||||||
|
|
||||||
vec3 mapped = (color-minMaxMean.r)/(minMaxMean.g-minMaxMean.r);
|
//vec3 mapped = (color-minMaxMean.r)/(minMaxMean.g-minMaxMean.r);
|
||||||
// Exposure tone mapping
|
// Exposure tone mapping
|
||||||
//vec3 mapped = vec3(1.0) - exp(-color * exposition);
|
vec3 mapped = vec3(1.0) - exp(-color * 0.5/minMaxMean.b);
|
||||||
|
|
||||||
// Gamma correction
|
// Gamma correction
|
||||||
mapped = pow(mapped, vec3(1.0 / gamma));
|
mapped = pow(mapped, vec3(1.0 / gamma));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user