now we're doing a bunch of them
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / common_world.glsl
index 45e12dff48267ba71c814a07a3272ea3eb29c339..043cf26898971b270032a2b5ff5bd78c4bacd202 100644 (file)
@@ -13,8 +13,10 @@ layout (std140) uniform ub_world_lighting
    int g_light_preview;
    int g_shadow_samples;
 
-   vec4 g_point_light_positions[32];
-   vec4 g_point_light_colours[32];
+   // g_time ?
+
+   //vec4 g_point_light_positions[32];
+   //vec4 g_point_light_colours[32];
 };
 
 uniform sampler2D g_world_depth;
@@ -41,15 +43,6 @@ float shadow_sample( vec3 vdir )
    return clamp( fdelta, 0.1, 0.2 )-0.1;
 }
 
-float sdLine( vec3 p, vec3 a, vec3 b )
-{
-  vec3 pa = p - a;
-  vec3 ba = b - a;
-
-  float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 );
-  return length( pa - ba*h );
-}
-
 vec3 apply_fog( vec3 vfrag, float fdist )
 {
    float dist = pow(fdist*0.0008,1.2);
@@ -85,12 +78,7 @@ float newlight_compute_sun_shadow()
    famt+=shadow_sample((vdir+vec3( 0.522,-0.379, 0.350)*fspread)*flength*0.7);
    famt+=shadow_sample((vdir+vec3( 0.483, 0.201, 0.306)*fspread)*flength*0.8);
 
-   // player shadow
-   float dist_to_player = max( 0.0, sdLine( aWorldCo, uBoard0, uBoard1 )-0.1 );
-   float player_shadow = max( 1.0-dist_to_player*2.7, 0.0 );
-   player_shadow *= player_shadow*player_shadow*player_shadow;
-
-   return 1.0 - max( player_shadow*0.8, famt );
+   return 1.0 - famt;
 }
 
 vec3 newlight_compute_world_diffuse( vec3 wnormal )