Skip to content

Commit

Permalink
FOG_EXP2: Modify order of multiplications to avoid possible over-/und…
Browse files Browse the repository at this point in the history
…erflow on mediump
  • Loading branch information
EliasHasle committed Mar 24, 2023
1 parent c0b03d6 commit 7b7cd00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderChunk/fog_fragment.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default /* glsl */`
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
float fogFactor = 1.0 - exp( - pow2( fogDensity * vFogDepth ) );
#else
Expand Down

0 comments on commit 7b7cd00

Please sign in to comment.