A new bias (it works better with harvest

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14594 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
samuncle 2013-12-01 17:47:30 +00:00
parent d1b8bc6073
commit 063ea38cc6

View File

@ -75,9 +75,22 @@ void main() {
float moved = (abs(dx) + abs(dy)) * 0.5;
/*
float bias = 0.002 * tan(acos(NdotL)); // According to the slope
bias += smoothstep(0.001, 0.1, moved) * 0.014; // According to the warping
bias = clamp(bias, 0.001, 0.014);
*/
/*
float avi = 0.002;
float abi = 0.0025; */
float avi = 0.0018;
float abi = 0.002;
float bias = avi * tan(acos(NdotL)); // According to the slope
bias += smoothstep(0.001, 0.1, moved) * abi; // According to the warping
bias = clamp(bias, 0.001, abi);
// This ID, and four IDs around this must match for a shadow pixel
float right = texture2D(shadowtex, shadowcoord.xy + vec2(shadowoffset, 0.0)).a;