Skip to content

Commit 20d5e36

Browse files
committed
Fix #779
1 parent 9091e43 commit 20d5e36

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Build/svencoop/renderer/shader/wsurf_shader.vert.glsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void main(void)
122122
MakeSkyVec(s_array[vertidx], t_array[vertidx], quadidx, GetCameraZFar(0), vertex, normal, texcoord);
123123

124124
vec4 normal4 = vec4(normal.xyz, 0.0);
125-
v_normal = normalize((normal4).xyz);
125+
v_normal = normal4.xyz;
126126

127127
#if defined(REVERT_NORMAL_ENABLED)
128128
v_normal = v_normal * -1.0;
@@ -139,7 +139,7 @@ void main(void)
139139
#else
140140

141141
vec4 normal4 = vec4(in_normal.xyz, 0.0);
142-
v_normal = normalize((EntityUBO.r_entityMatrix * normal4).xyz);
142+
v_normal = (EntityUBO.r_entityMatrix * normal4).xyz;
143143

144144
#if defined(REVERT_NORMAL_ENABLED)
145145
v_normal = v_normal * -1.0;
@@ -149,7 +149,7 @@ void main(void)
149149

150150
#if 1//Use smooth normal for vertex scaling
151151
vec4 smoothnormal4 = vec4(in_smoothnormal.xyz, 0.0);
152-
vec3 smoothnormal3 = normalize((EntityUBO.r_entityMatrix * smoothnormal4).xyz);
152+
vec3 smoothnormal3 = (EntityUBO.r_entityMatrix * smoothnormal4).xyz;
153153

154154
worldpos4.xyz += smoothnormal3.xyz * EntityUBO.r_scale;
155155
#endif
@@ -180,15 +180,15 @@ void main(void)
180180
tangent4 = tangent4 * -1.0;
181181
#endif
182182

183-
v_tangent = normalize((EntityUBO.r_entityMatrix * tangent4).xyz);
183+
v_tangent = (EntityUBO.r_entityMatrix * tangent4).xyz;
184184

185185
vec4 bitangent4 = vec4(in_bitangent, 0.0);
186186

187187
#if defined(REVERT_NORMAL_ENABLED)
188188
bitangent4 = bitangent4 * -1.0;
189189
#endif
190190

191-
v_bitangent = normalize((EntityUBO.r_entityMatrix * bitangent4).xyz);
191+
v_bitangent = (EntityUBO.r_entityMatrix * bitangent4).xyz;
192192

193193
#endif
194194

0 commit comments

Comments
 (0)