X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_override.h;h=d0c7ab924ac175300f217f3ee3903898bd94f7c4;hb=7f4c71033c06954f3094c9d51219628438b80ac8;hp=fb5367148cb095043f21aab4eea7e53bc4d6ec9c;hpb=63fe317d7db724162561da52aa382c82ac3c29be;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_override.h b/shaders/scene_override.h index fb53671..d0c7ab9 100644 --- a/shaders/scene_override.h +++ b/shaders/scene_override.h @@ -210,14 +210,18 @@ static struct vg_shader _shader_scene_override = { " vec3 sun_colour = mix( vec3(1.0), g_sunset_colour.rgb, g_sunset_phase*0.5 );\n" " sun_colour *= sun_shape;\n" "\n" -"\n" +" \n" " float star = 0.0;\n" -" for( float j = 1.0; j <= 4.1; j += 1.0 ){\n" -" float m = mix(0.6, 0.9, smoothstep(1.0, 2.0, j));\n" -" star += stars( ray_dir, 1.94 * pow( 1.64, j ), m ) * (1.0 / pow(4.0, j));\n" +" float star_blend = 10.0*max(0.0,(1.0-g_day_phase*2.0));\n" +"\n" +" if( star_blend > 0.001 ){\n" +" for( float j = 1.0; j <= 4.1; j += 1.0 ){\n" +" float m = mix(0.6, 0.9, smoothstep(1.0, 2.0, j));\n" +" star += stars( ray_dir, 1.94 * pow( 1.64, j ), m ) * (1.0/pow(4.0, j));\n" +" }\n" " }\n" " \n" -" vec3 composite = sky_colour + sun_colour + star*10.0*max(0.0,(1.0-g_day_phase*2.0));\n" +" vec3 composite = sky_colour + sun_colour + star*star_blend;\n" " return composite;\n" "}\n" "\n" @@ -478,7 +482,7 @@ static struct vg_shader _shader_scene_override = { "\n" " compute_motion_vectors();\n" "\n" -" vec3 vfrag = vec3(0.5);\n" +" vec3 vfrag = vec3(0.7);\n" " vec3 qnorm = aNorm.xyz;\n" "\n" " qnorm = normalize(floor(aNorm.xyz*4.0)*0.25);\n"