projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
scoretext.h
diff --git
a/shaders/scoretext.h
b/shaders/scoretext.h
index 3e499bb3ba6de382cab2904eba526c18c6e49332..0a4bc959149ff4e30648483a80f01b8026aa408f 100644
(file)
--- a/
shaders/scoretext.h
+++ b/
shaders/scoretext.h
@@
-11,8
+11,10
@@
static struct vg_shader _shader_scoretext = {
.static_src =
"layout (location=0) in vec3 a_co;\n"
"layout (location=1) in vec3 a_norm;\n"
.static_src =
"layout (location=0) in vec3 a_co;\n"
"layout (location=1) in vec3 a_norm;\n"
-"layout (location=2) in vec4 a_colour;\n"
-"layout (location=3) in vec2 a_uv;\n"
+"layout (location=2) in vec2 a_uv;\n"
+"layout (location=3) in vec4 a_colour;\n"
+"layout (location=4) in vec4 a_weights;\n"
+"layout (location=5) in ivec4 a_groups;\n"
"\n"
"#line 2 0 \n"
"\n"
"\n"
"#line 2 0 \n"
"\n"
@@
-29,12
+31,12
@@
static struct vg_shader _shader_scoretext = {
"\n"
"void main()\n"
"{\n"
"\n"
"void main()\n"
"{\n"
-" float w =
a_colour.g + fract(uInfo.z+0.5)-0.75
;\n"
+" float w =
(a_colour.g * 8.0)-5.5 + fract(uInfo.z+0.5)
;\n"
" float c = -cos(w*0.2);\n"
" float s = -sin(w*0.2);\n"
" float r = 0.2;\n"
"\n"
" float c = -cos(w*0.2);\n"
" 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"
" float c1 = cos(w1);\n"
" float s1 = sin(w1);\n"
"\n"
@@
-83,6
+85,7
@@
static struct vg_shader _shader_scoretext = {
" float g_water_fog;\n"
" int g_light_count;\n"
" int g_light_preview;\n"
" 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"
"};\n"
"\n"
"uniform sampler2D g_world_depth;\n"
@@
-147,6
+150,11
@@
static struct vg_shader _shader_scoretext = {
"\n"
"vec3 do_light_shadowing( vec3 vfrag )\n"
"{\n"
"\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"
" float fspread = g_light_colours[0].w;\n"
" vec3 vdir = g_light_directions[0].xyz;\n"
" float flength = g_light_directions[0].w;\n"