GPU: Silence warning of potentially unused variable (NormalMatrix)
This commit is contained in:
parent
15f5457502
commit
e960cecdf8
|
@ -26,9 +26,7 @@ out vec3 fCol;
|
|||
|
||||
// TODO: in float angle; // [-pi .. +pi], + peak, 0 flat, - valley
|
||||
|
||||
mat3 NormalMatrix;
|
||||
|
||||
bool front(vec3 N, vec3 eye)
|
||||
bool front(mat3 NormalMatrix, vec3 N, vec3 eye)
|
||||
{
|
||||
return dot(NormalMatrix * N, eye) > 0.0;
|
||||
}
|
||||
|
@ -41,7 +39,7 @@ void main()
|
|||
|
||||
MV_pos = ModelViewMatrix * vec4(pos, 1.0);
|
||||
|
||||
NormalMatrix = transpose(inverse(mat3(ModelViewMatrix)));
|
||||
mat3 NormalMatrix = transpose(inverse(mat3(ModelViewMatrix)));
|
||||
|
||||
/* if persp */
|
||||
if (ProjectionMatrix[3][3] == 0.0) {
|
||||
|
@ -51,8 +49,8 @@ void main()
|
|||
eye = vec3(0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
bool face_1_front = front(N1, eye);
|
||||
bool face_2_front = front(N2, eye);
|
||||
bool face_1_front = front(NormalMatrix, N1, eye);
|
||||
bool face_2_front = front(NormalMatrix, N2, eye);
|
||||
|
||||
if (face_1_front && face_2_front)
|
||||
edgeClass = 1.0; // front-facing edge
|
||||
|
|
Loading…
Reference in New Issue