Use depth fail and front cap for geometry shadows (TODO back cap)
This commit is contained in:
@@ -8,7 +8,7 @@ void main()
|
||||
vec4 p0 = gl_in[0].gl_Position ;
|
||||
vec4 p1 = gl_in[1].gl_Position ;
|
||||
vec4 p2 = gl_in[2].gl_Position ;
|
||||
if ( dot( lightPos, cross( p0.xyz - p1.xyz, p1.xyz - p2.xyz)) < 0)
|
||||
if ( dot( p0.xyz - lightPos, cross( p0.xyz - p1.xyz, p1.xyz - p2.xyz)) < 0)
|
||||
{
|
||||
gl_Position = theMat * p0; EmitVertex();
|
||||
gl_Position = theMat * p1; EmitVertex();
|
||||
|
||||
Reference in New Issue
Block a user