Tweaked shadowmap bias to fight Peter Pan effect

This commit is contained in:
Robert Beckebans 2015-03-19 00:31:08 +01:00
parent b7f67a1dd9
commit 319b659302
2 changed files with 4 additions and 4 deletions

View file

@ -196,8 +196,8 @@ void main( PS_IN fragment, out PS_OUT result )
float bias = 0.001;
shadowTexcoord.xyz /= shadowTexcoord.w;
//shadowTexcoord.z = shadowTexcoord.z * 0.9991;
shadowTexcoord.z = shadowTexcoord.z - bias;
shadowTexcoord.z = shadowTexcoord.z * 0.9995;
//shadowTexcoord.z = shadowTexcoord.z - bias;
shadowTexcoord.w = float(shadowIndex);
#if 0

View file

@ -4389,8 +4389,8 @@ static const cgShaderDef_t cg_renderprogs[] =
" float bias = 0.001;\n"
" \n"
" shadowTexcoord.xyz /= shadowTexcoord.w;\n"
" //shadowTexcoord.z = shadowTexcoord.z * 0.9991;\n"
" shadowTexcoord.z = shadowTexcoord.z - bias;\n"
" shadowTexcoord.z = shadowTexcoord.z * 0.9995;\n"
" //shadowTexcoord.z = shadowTexcoord.z - bias;\n"
" shadowTexcoord.w = float(shadowIndex);\n"
"\n"
"#if 0\n"