Skip to content

Commit

Permalink
fix: normal offset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
solomon-gumball committed Jun 19, 2015
1 parent 88313b9 commit d90e3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webgl-shaders/FragmentShader.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void main() {
vec3 normalOffset = u_normals.x < 0.0 ? applyMaterial(u_normals) * 2.0 - 1.0 : vec3(0.0);
vec3 normal = (v_normal + normalOffset);
normal.y *= -1.0;
normal = normalize(u_normalMatrix * (normal + normalOffset));
normal = normalize(u_normalMatrix * normal);

vec4 glossiness = u_glossiness.x < 0.0 ? applyMaterial(u_glossiness) : u_glossiness;
int numLights = int(u_numLights);
Expand Down

0 comments on commit d90e3b3

Please sign in to comment.