Skip to content

Commit b9e0ff4

Browse files
fix: normal offset fix
1 parent b87a023 commit b9e0ff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webgl-shaders/FragmentShader.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void main() {
4646
vec3 normalOffset = u_normals.x < 0.0 ? applyMaterial(u_normals) * 2.0 - 1.0 : vec3(0.0);
4747
vec3 normal = (v_normal + normalOffset);
4848
normal.y *= -1.0;
49-
normal = normalize(u_normalMatrix * (normal + normalOffset));
49+
normal = normalize(u_normalMatrix * normal);
5050

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

0 commit comments

Comments
 (0)