-vec3 do_light_spec( vec3 vfrag, vec3 wnormal, vec3 halfview, float fintensity )
-{
- vec3 vcolour = g_light_colours[0].rgb;
- vec3 vdir = g_light_directions[0].xyz;
+float newlight_compute_sun_shadow( vec3 co, vec3 dir ){
+ if( g_shadow_samples == 0 ){
+ return 1.0;
+ }
+
+ float fspread = g_shadow_spread;
+ float flength = g_shadow_length;
+
+ float famt = 0.0;
+ famt += shadow_sample(co+(dir+vec3(-0.56,0.55, 0.30)*fspread)*flength*0.1);
+ famt += shadow_sample(co+(dir+vec3( 0.80,0.68, 0.34)*fspread)*flength*0.2);
+ famt += shadow_sample(co+(dir+vec3( 0.78,0.07,-0.06)*fspread)*flength*0.3);
+ famt += shadow_sample(co+(dir+vec3(-0.59,0.07,-0.42)*fspread)*flength*0.4);
+
+ //famt+=shadow_sample(co+(dir+vec3(-0.790,-0.933,-0.875)*fspread)*flength*0.5);
+ //famt+=shadow_sample(co+(dir+vec3( 0.807,-0.690, 0.472)*fspread)*flength*0.6);
+ //famt+=shadow_sample(co+(dir+vec3( 0.522,-0.379, 0.350)*fspread)*flength*0.7);
+ //famt+=shadow_sample(co+(dir+vec3( 0.483, 0.201, 0.306)*fspread)*flength*0.8);