X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_font.h;h=8a2555d1e61d50e09676f846e9551dde7dec800d;hb=296560179b19451468030f202b17492b1c71b9d0;hp=747175a6f9ca6b0913ce1f59e5130a830165f955;hpb=c16f95624c142beec1572baa24f262e8a661f3fb;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_font.h b/shaders/scene_font.h index 747175a..8a2555d 100644 --- a/shaders/scene_font.h +++ b/shaders/scene_font.h @@ -65,7 +65,7 @@ static struct vg_shader _shader_scene_font = { .orig_file = "shaders/scene_font.fs", .static_src = "uniform sampler2D uTexGarbage; // unused\n" -"uniform sampler2D uTexMain;\n" +"uniform sampler2D uTexMain; // unused\n" "uniform vec3 uCamera;\n" "uniform float uTime;\n" "uniform float uOpacity;\n" @@ -431,15 +431,14 @@ static struct vg_shader _shader_scene_font = { "#line 10 0 \n" "\n" "vec3 pal( float t ){\n" -" vec3 a = vec3(0.3,0.3,0.3);\n" -" vec3 b = vec3(1.00,1.0,1.0);\n" +" vec3 a = vec3(0.30,0.3,0.3);\n" +" vec3 b = vec3(0.8);\n" " vec3 c = vec3(0.28,0.3,0.4);\n" " vec3 d = vec3(0.00,0.1,0.1);\n" " return a + b*cos( 6.28318*(c*t+d) );\n" "}\n" "\n" -"void main()\n" -"{\n" +"void main(){\n" " compute_motion_vectors();\n" "\n" " vec3 vfrag = vec3(0.5,0.5,0.5);\n" @@ -457,12 +456,11 @@ static struct vg_shader _shader_scene_font = { " vec4 v1 = step( vec4(0.5), fract(vec4(a) + spread1) );\n" "\n" " float d = ( v0.x+v0.y+v0.z+v0.w +\n" -" v1.x+v1.y+v1.z+v1.w ) * 0.0625;\n" +" v1.x+v1.y+v1.z+v1.w ) * 0.125f;\n" " \n" " float dither = fract(dot(vec2(171.0,231.0),gl_FragCoord.xy)/71.0);\n" -" const float STEPS = 8.;\n" -" float x = d*0.8+length(p)*0.2;\n" -" x = (floor(x * STEPS) + step(dither, fract(x * STEPS))) / STEPS;\n" +" float x = d*0.8+length(p)*0.3;\n" +" x = (floor(x*8.0) + step(dither, fract(x * 8.0))) / 8.0;\n" "\n" " if( x + (uOpacity*2.0-1.0) < 0.5 ) \n" " discard;\n" @@ -473,8 +471,8 @@ static struct vg_shader _shader_scene_font = { " vfrag = vec3(0.5);\n" " }\n" "\n" -" vec3 litfrag = scene_compute_lighting( vfrag, qnorm, aWorldCo );\n" -" oColour = vec4( litfrag, 1.0 );\n" +" vfrag = scene_compute_lighting( vfrag, qnorm, aWorldCo );\n" +" oColour = vec4( vfrag, 1.0 );\n" "}\n" ""}, };