Skip to content
Snippets Groups Projects
Commit 76c622b7 authored by D-AIRY's avatar D-AIRY
Browse files

Bias fix for pointlights

parent 64c45059
Branches
Tags
No related merge requests found
......@@ -102,6 +102,7 @@ float4 main(VSO_ResPos IN):COLOR0
float fBiasZ = (lf - fDepthLightZ * (lf - ln)) * (lf - fDepthLightZ * (lf - ln)) / (lf * ln * (lf - ln)) * lf * 0.0008f * fScaleFactor - fBias0;
// float fD = g_vPixelSizeBias.x * 0.5f * fDistance / g_vLightColorPower.w;
fBias = sqrt(1.0f / (cosTheta * cosTheta) - 1.0f);
// fBias = fD * sqrt(1.0f / (cosTheta * cosTheta) - 1.0f);
// float fCompareTo = fDistance - fBias * 200.0f;
float fCompareTo = fDistance - fBias;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment