projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
scene_font.h
diff --git
a/shaders/scene_font.h
b/shaders/scene_font.h
index 747175a6f9ca6b0913ce1f59e5130a830165f955..eec4b6ce75a025d58297256e7d20dc98a5eec437 100644
(file)
--- 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"
.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"
"uniform vec3 uCamera;\n"
"uniform float uTime;\n"
"uniform float uOpacity;\n"
@@
-279,7
+279,7
@@
static struct vg_shader _shader_scene_font = {
" light_delta = normalize( light_delta );\n"
"\n"
" float quadratic = dist2*100.0;\n"
" light_delta = normalize( light_delta );\n"
"\n"
" float quadratic = dist2*100.0;\n"
-" float attenuation = 1.0
f/( 1.0f
+ quadratic );\n"
+" float attenuation = 1.0
/( 1.0
+ quadratic );\n"
" attenuation *= max( dot( light_delta, normal ), 0.0 );\n"
"\n"
" float falloff = max( 0.0, 1.0-(dist2*light_co.w) );\n"
" attenuation *= max( dot( light_delta, normal ), 0.0 );\n"
"\n"
" float falloff = max( 0.0, 1.0-(dist2*light_co.w) );\n"
@@
-431,17
+431,15
@@
static struct vg_shader _shader_scene_font = {
"#line 10 0 \n"
"\n"
"vec3 pal( float t ){\n"
"#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.3
0
,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"
" 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"
" compute_motion_vectors();\n"
-"\n"
" vec3 vfrag = vec3(0.5,0.5,0.5);\n"
" vec3 qnorm = aNorm.xyz;\n"
"\n"
" vec3 vfrag = vec3(0.5,0.5,0.5);\n"
" vec3 qnorm = aNorm.xyz;\n"
"\n"
@@
-457,12
+455,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"
" 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.
06
25;\n"
+" v1.x+v1.y+v1.z+v1.w ) * 0.
1
25;\n"
" \n"
" float dither = fract(dot(vec2(171.0,231.0),gl_FragCoord.xy)/71.0);\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"
"\n"
" if( x + (uOpacity*2.0-1.0) < 0.5 ) \n"
" discard;\n"
@@
-473,8
+470,8
@@
static struct vg_shader _shader_scene_font = {
" vfrag = vec3(0.5);\n"
" }\n"
"\n"
" vfrag = vec3(0.5);\n"
" }\n"
"\n"
-" v
ec3 lit
frag = scene_compute_lighting( vfrag, qnorm, aWorldCo );\n"
-" oColour = vec4(
lit
frag, 1.0 );\n"
+" vfrag = scene_compute_lighting( vfrag, qnorm, aWorldCo );\n"
+" oColour = vec4(
v
frag, 1.0 );\n"
"}\n"
""},
};
"}\n"
""},
};