HDR output buffer (WIP)

This commit is contained in:
2022-02-15 23:37:42 +08:00
parent a628fdb434
commit 326253a73b
5 changed files with 34 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ void main() {
color += vec4(fragColor.rgb * light, 0.0f);
color.a = fragColor.a;
color.rgb = pow(color.rgb, vec3(1.0/gamma));
color.rgb = color.rgb;
float z = gl_FragCoord.z / gl_FragCoord.w;
float fog = clamp(exp(-fogDensity * z * z), 0.2, 1);