shadow tweak
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / terrain.h
index 09258e744221022a5961ee9b753ea18756b3f796..08d8500643dacdeb3c96a433acd47a89e0a03314 100644 (file)
@@ -156,7 +156,6 @@ static struct vg_shader _shader_terrain = {
 "   return mix( vfrag, g_ambient_colour.rgb, faccum );\n"
 "}\n"
 "\n"
-"// FIXME\n"
 "float sdLine( vec3 p, vec3 a, vec3 b )\n"
 "{\n"
 "  vec3 pa = p - a;\n"
@@ -188,11 +187,11 @@ static struct vg_shader _shader_terrain = {
 "   famt+=shadow_sample((vdir+vec3( 0.483, 0.201, 0.306)*fspread)*flength*0.8);\n"
 "\n"
 "   // player shadow\n"
-"   float dist_to_player = max( 0.0, sdLine( aWorldCo, uBoard0, uBoard1 )-0.03 );\n"
-"   float player_shadow = max( 1.0-dist_to_player*1.7, 0.0 );\n"
+"   float dist_to_player = max( 0.0, sdLine( aWorldCo, uBoard0, uBoard1 )-0.1 );\n"
+"   float player_shadow = max( 1.0-dist_to_player*2.7, 0.0 );\n"
 "   player_shadow *= player_shadow*player_shadow*player_shadow;\n"
 "\n"
-"   famt = max( player_shadow*0.6, famt );\n"
+"   famt = max( player_shadow*0.8, famt );\n"
 "   return mix( vfrag, g_ambient_colour.rgb, famt );\n"
 "}\n"
 "\n"