Merge pull request #5853 from fr500/master

fix the shader and the label
This commit is contained in:
Twinaphex 2017-12-03 18:28:58 +01:00 committed by GitHub
commit da233c89c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -15,6 +15,8 @@ static const char* stock_fragment_xmb_snowflake = GLSL(
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
} }
float rand(float x){ return rand(vec2(x,1.0));}
float snow(vec3 pos, vec2 uv, float o) float snow(vec3 pos, vec2 uv, float o)
{ {
vec2 d = (pos.xy - uv); vec2 d = (pos.xy - uv);
@ -35,9 +37,9 @@ static const char* stock_fragment_xmb_snowflake = GLSL(
float col(vec2 c) float col(vec2 c)
{ {
float color = 0.0; float color = 0.0;
for (int i = 1; i < 15; i++) for (int i = 1; i < 50; i++)
{ {
float o = rand(float(i) / 3.) * 15 * 2.0; float o = rand(float(i) / 3.0) * 15 * 2.0;
float z = rand(float(i) + 13.0); float z = rand(float(i) + 13.0);
float x = 1.8 - (3.6) * (rand(floor((time*((z+1.0)/2.0)+o)/2.0)) + sin(time*o/1000.0)/10.0); float x = 1.8 - (3.6) * (rand(floor((time*((z+1.0)/2.0)+o)/2.0)) + sin(time*o/1000.0)/10.0);
float y = 1.0-mod((time*((z+1.0)/2.0))+o, 2.0); float y = 1.0-mod((time*((z+1.0)/2.0))+o, 2.0);
@ -45,8 +47,6 @@ static const char* stock_fragment_xmb_snowflake = GLSL(
color += snow(vec3(x,y,z),c,o); color += snow(vec3(x,y,z),c,o);
} }
return color; return color;
} }

View File

@ -246,6 +246,7 @@ static void menu_action_setting_disp_set_label_pipeline(
strlcpy(s, strlcpy(s,
msg_hash_to_str( msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_BOKEH), len); MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_BOKEH), len);
break;
case XMB_SHADER_PIPELINE_SNOWFLAKE: case XMB_SHADER_PIPELINE_SNOWFLAKE:
strlcpy(s, strlcpy(s,
msg_hash_to_str( msg_hash_to_str(