Browse Source

Fixing: Sprites aren't affected by FogExp2 (#6444)

See issue #6444. Solved by WestLangley.
Max Strater 10 years ago
parent
commit
ff54b02b68
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/renderers/webgl/plugins/SpritePlugin.js

+ 1 - 1
src/renderers/webgl/plugins/SpritePlugin.js

@@ -324,7 +324,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 					'} else {',
 
 						'const float LOG2 = 1.442695;',
-						'float fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );',
+						'fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );',
 						'fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );',
 
 					'}',