Skip to content

Commit

Permalink
Fix linear fog color mix: colors have to be mixed in linear space, no…
Browse files Browse the repository at this point in the history
…t factor (#4283)

Co-authored-by: kirill.osipov@faraway.gg <Kirill Osipov>
  • Loading branch information
querielo authored May 31, 2022
1 parent e1a266a commit 599355a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/graphics/program-lib/chunks/lit/frag/fogLinear.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ vec3 addFog(vec3 color) {
float depth = gl_FragCoord.z / gl_FragCoord.w;
float fogFactor = (fog_end - depth) / (fog_end - fog_start);
fogFactor = clamp(fogFactor, 0.0, 1.0);
fogFactor = gammaCorrectInput(fogFactor);
return mix(fog_color * dBlendModeFogFactor, color, fogFactor);
}
`;

0 comments on commit 599355a

Please sign in to comment.