From 3cd7026819286e2ced5adcfa267207290a73a9fd Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 3 Dec 2017 12:19:00 -0500 Subject: [PATCH] fix the shader and the label --- gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h | 8 ++++---- menu/cbs/menu_cbs_get_value.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h b/gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h index f2bd97f6df..a5426710ba 100644 --- a/gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h +++ b/gfx/drivers/gl_shaders/pipeline_snowflake.glsl.frag.h @@ -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); } + float rand(float x){ return rand(vec2(x,1.0));} + float snow(vec3 pos, vec2 uv, float o) { vec2 d = (pos.xy - uv); @@ -35,17 +37,15 @@ static const char* stock_fragment_xmb_snowflake = GLSL( float col(vec2 c) { 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 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); color += snow(vec3(x,y,z),c,o); } - - return color; } diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 5b98e95554..d58701f8e3 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -246,6 +246,7 @@ static void menu_action_setting_disp_set_label_pipeline( strlcpy(s, msg_hash_to_str( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_BOKEH), len); + break; case XMB_SHADER_PIPELINE_SNOWFLAKE: strlcpy(s, msg_hash_to_str(