Skip to content

Commit

Permalink
Rend2: Fix sporadic black triangles on G2 models
Browse files Browse the repository at this point in the history
Forgot to shift tangent vector into [-0.5, 0.5] range after reading from
vertex input!
  • Loading branch information
xycaleth committed Jul 25, 2015
1 parent c59e705 commit 7289d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codemp/rd-rend2/glsl/lightall_vp.glsl
Expand Up @@ -171,7 +171,7 @@ void main()
vec4 originalNormal = vec4(attr_Normal - vec3 (0.5), 0.0);
#if defined(USE_VERT_TANGENT_SPACE) && defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
vec4 tangent4 = vec4(0.0);
vec4 originalTangent = vec4(attr_Tangent.xyz, 0.0);
vec4 originalTangent = vec4(attr_Tangent.xyz - vec3(0.5), 0.0);
#endif

for (int i = 0; i < 4; i++)
Expand Down

0 comments on commit 7289d01

Please sign in to comment.