diff --git a/examples/jsm/objects/Sky.js b/examples/jsm/objects/Sky.js index b986da6b60552c..68908bb9c0833b 100644 --- a/examples/jsm/objects/Sky.js +++ b/examples/jsm/objects/Sky.js @@ -138,8 +138,6 @@ Sky.SkyShader = { uniform float mieDirectionalG; uniform vec3 up; - const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 ); - // constants for atmospheric scattering const float pi = 3.141592653589793238462643383279502884197169; @@ -169,7 +167,7 @@ Sky.SkyShader = { void main() { - vec3 direction = normalize( vWorldPosition - cameraPos ); + vec3 direction = normalize( vWorldPosition - cameraPosition ); // optical length // cutoff angle at 90 to avoid singularity in next formula.