diff --git a/internal/asset/shader/world/output.frag b/internal/asset/shader/world/output.frag index 70d5b9c..9b4a39f 100644 --- a/internal/asset/shader/world/output.frag +++ b/internal/asset/shader/world/output.frag @@ -11,5 +11,11 @@ void main() { if (texColor.a < 1e-4) discard; - outputColor = vec4(pow(texColor.rgb * exposure, vec3(1.0/gamma)), 1.0f); + vec3 mapped = texColor.rgb; + if (exposure < 1e-4) + mapped = mapped / (mapped + vec3(1.0)); + else + mapped = vec3(1.0) - exp(-mapped * exposure); + + outputColor = vec4(pow(mapped, vec3(1.0/gamma)), 1.0f); }