diff --git a/examples/jsm/lines/LineMaterial.js b/examples/jsm/lines/LineMaterial.js index e21960d08cb61e..f14534aa964f2b 100644 --- a/examples/jsm/lines/LineMaterial.js +++ b/examples/jsm/lines/LineMaterial.js @@ -311,6 +311,9 @@ ShaderLib[ 'line' ] = { void main() { + float alpha = opacity; + vec4 diffuseColor = vec4( diffuse, alpha ); + #include #ifdef USE_DASH @@ -321,8 +324,6 @@ ShaderLib[ 'line' ] = { #endif - float alpha = opacity; - #ifdef WORLD_UNITS // Find the closest points on the view ray and the line segment @@ -387,8 +388,6 @@ ShaderLib[ 'line' ] = { #endif - vec4 diffuseColor = vec4( diffuse, alpha ); - #include #include