Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Fix compilation bug in uber-shader for NORMALS define.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 148495415
Change-Id: I735d785afb5b0596e4187e057f6f3a42fc025116
  • Loading branch information
jsanmiya authored and a-maurice committed Feb 25, 2017
1 parent 24fd624 commit 04b9d04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/shaders/uber_shader.glslv
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ varying vec3 vPosition;
attribute vec3 aNormal;
varying vec3 vNormal;
#endif // PHONG_SHADING
attribute vec3 aTangent;
varying vec3 vTangent;
attribute vec4 aTangent;
varying vec4 vTangent;
varying vec3 vObjectSpacePosition;
varying vec3 vTangentSpaceLightVector;
varying vec3 vTangentSpaceCameraVector
varying vec3 vTangentSpaceCameraVector;
uniform vec3 light_pos; // in object space
uniform vec3 camera_pos; // in object space
#endif // NORMALS
Expand Down Expand Up @@ -98,7 +98,7 @@ void main()
vObjectSpacePosition = aPosition.xyz;

vec3 n = normalize(vNormal);
vec3 t = normalize(vTangent);
vec3 t = normalize(vTangent.xyz);
vec3 b = normalize(cross(n, t)) * aTangent.w;

mat3 world_to_tangent_matrix = mat3(t, b, n);
Expand Down

0 comments on commit 04b9d04

Please sign in to comment.