Bias the trace end point to reduce shadow acne
This commit is contained in:
parent
dedd7245f2
commit
59205533b2
1 changed files with 1 additions and 1 deletions
|
|
@ -184,7 +184,7 @@ vec2 getVogelDiskSample(int sampleIndex, int sampleCount, float phi)
|
|||
|
||||
float traceShadow(vec4 lightpos, int quality, float softShadowRadius)
|
||||
{
|
||||
vec3 origin = pixelpos.xyz;
|
||||
vec3 origin = pixelpos.xyz + vWorldNormal.xyz;
|
||||
vec3 target = lightpos.xyz + 0.01; // nudge light position slightly as Doom maps tend to have their lights perfectly aligned with planes
|
||||
|
||||
vec3 direction = normalize(target - origin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue