Fix tone mapping

This commit is contained in:
bailehuni 2024-03-31 11:25:29 +01:00
parent d2223a7b45
commit 17dbc8797b

View File

@ -122,7 +122,7 @@ void main() {
lighting += mix(ambient_light, texture(globalSetSkybox, R).rgb, metallic) * ao * diffuse_brdf; // this is NOT physically-based, it just looks cool lighting += mix(ambient_light, texture(globalSetSkybox, R).rgb, metallic) * ao * diffuse_brdf; // this is NOT physically-based, it just looks cool
// tone mapping // tone mapping
const vec3 hdr_color = min(emission + lighting, 1.0); const vec3 hdr_color = emission + lighting;
outColor = vec4(hdr_color / (hdr_color + 1.0), 1.0); outColor = vec4(hdr_color / (hdr_color + 1.0), 1.0);
//outColor = vec4(vec3(1.0 - shadow), 1.0); //outColor = vec4(vec3(1.0 - shadow), 1.0);
} }