X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscoretext.h;h=0a4bc959149ff4e30648483a80f01b8026aa408f;hb=a1741ec4aed057cbafff2d6bc9e5cf8a15ae322b;hp=99b702c088c0f418bcbac3a54ad68ad8e190a205;hpb=4a883ac1b2506032f9dddab342712de46f2ca734;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scoretext.h b/shaders/scoretext.h index 99b702c..0a4bc95 100644 --- a/shaders/scoretext.h +++ b/shaders/scoretext.h @@ -36,7 +36,7 @@ static struct vg_shader _shader_scoretext = { " float s = -sin(w*0.2);\n" " float r = 0.2;\n" "\n" -" float w1 = clamp( w*4.0 - a_co.y*10.0, -1.0, 1.0 ) *(3.14159265*0.5);\n" +" float w1 = clamp( w*4.0 - a_co.y*10.0, -1.0, 1.0 ) * (3.14159265*0.5);\n" " float c1 = cos(w1);\n" " float s1 = sin(w1);\n" "\n" @@ -85,6 +85,7 @@ static struct vg_shader _shader_scoretext = { " float g_water_fog;\n" " int g_light_count;\n" " int g_light_preview;\n" +" int g_shadow_samples;\n" "};\n" "\n" "uniform sampler2D g_world_depth;\n" @@ -149,6 +150,11 @@ static struct vg_shader _shader_scoretext = { "\n" "vec3 do_light_shadowing( vec3 vfrag )\n" "{\n" +" if( g_shadow_samples == 0 )\n" +" {\n" +" return vfrag;\n" +" }\n" +"\n" " float fspread = g_light_colours[0].w;\n" " vec3 vdir = g_light_directions[0].xyz;\n" " float flength = g_light_directions[0].w;\n"