General cleanup
This commit is contained in:
@@ -5,7 +5,6 @@ layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vCol;
|
||||
void main()
|
||||
{
|
||||
//gl_Position = theMat * vec4(pos,1);
|
||||
gl_Position = vec4(pos,1);
|
||||
vCol = col;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ void main()
|
||||
// that is, if the normals of the faces connected to the edge are in
|
||||
// "different directions" wrt the light direction
|
||||
// (first test the "drawbit")
|
||||
if (p0.w==1 && dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
//if (p0.w==1 && dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
if ( dot(n0, lightDir) * dot(n1, lightDir) <= 0 &&
|
||||
(dot(lightDir, lightDir) < ru2 || dot(lightDir2, lightDir2) < ru2))
|
||||
// using <= rather than < seems to get rid of overlapping shadow
|
||||
// artefacts
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec4 inColor;
|
||||
layout (location = 2) in vec4 inTexCoord;
|
||||
//layout (location = 2) in vec4 inTexCoord;
|
||||
layout (location = 2) in vec3 inTexCoord;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec4 vColor;
|
||||
out vec3 vTexCoord;
|
||||
@@ -9,5 +10,6 @@ void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(inPos.xyz, 1.0);
|
||||
vColor = inColor;
|
||||
vTexCoord = inTexCoord.xyz;
|
||||
//vTexCoord = inTexCoord.xyz;
|
||||
vTexCoord = inTexCoord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user