Browse Source

work around Chrome on Andriod bug - can not use struct constructors.

Ben Houston 9 years ago
parent
commit
b617f33aa3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/renderers/shaders/ShaderChunk/lights_template.glsl

+ 4 - 1
src/renderers/shaders/ShaderChunk/lights_template.glsl

@@ -13,7 +13,10 @@
 //  - Add diffuse light probe (irradiance cubemap) support.
 //
 
-GeometricContext geometry = GeometricContext( -vViewPosition, normal, normalize( vViewPosition ) );
+GeometricContext geometry;
+geometry.position = -vViewPosition;
+geometry.normal = normal;
+geometry.viewDir = normalize( vViewPosition );
 
 #if ( NUM_POINT_LIGHTS > 0 ) && defined( Material_RE_DirectLight )