Merge pull request #539 from Lunarsong/patch-2
Removed redundant division by w
This commit is contained in:
commit
3eec106b47
1 changed files with 2 additions and 3 deletions
|
|
@ -14,10 +14,9 @@ layout (location = 0) out vec4 outFragColor;
|
|||
|
||||
#define ambient 0.1
|
||||
|
||||
float textureProj(vec4 P, vec2 off)
|
||||
float textureProj(vec4 shadowCoord, vec2 off)
|
||||
{
|
||||
float shadow = 1.0;
|
||||
vec4 shadowCoord = P / P.w;
|
||||
if ( shadowCoord.z > -1.0 && shadowCoord.z < 1.0 )
|
||||
{
|
||||
float dist = texture( shadowMap, shadowCoord.st + off ).r;
|
||||
|
|
@ -65,4 +64,4 @@ void main()
|
|||
|
||||
outFragColor = vec4(diffuse * shadow, 1.0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue