diff options
Diffstat (limited to '')
| -rw-r--r-- | src/main/resources/shaders/roll_credits.glsl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/main/resources/shaders/roll_credits.glsl b/src/main/resources/shaders/roll_credits.glsl index 416a5e6..83c3c34 100644 --- a/src/main/resources/shaders/roll_credits.glsl +++ b/src/main/resources/shaders/roll_credits.glsl @@ -1,5 +1,5 @@ #version 430 -layout(local_size_x = 1, local_size_y = 1) in; +layout(local_size_x = 8, local_size_y = 8) in; #include <sdf> #include <utils> @@ -18,7 +18,6 @@ const float MIN_GAP = 0.001; uniform float seconds = 0; -layout(rgba8) uniform readonly image2D noise_texture; layout(rgba8) uniform writeonly image2D output_image; uniform float antialiasing = 0.28; @@ -40,11 +39,6 @@ vec3 sandyellow = srgb(0.81, 0.66, 0.43); // 0.79,0.60,0.34 vec3 red1 = srgb(0.69, 0.09, 0.06); vec3 gold = srgb(0.89, 0.77, 0.26); -float sample_noise(in vec2 p) { - vec4 noise = imageLoad(noise_texture, ivec2(p * imageSize(noise_texture))); - return noise.x; -} - const int O_DUNE1 = 1; const int O_CAPE = 2; const int O_WALKSTICK = 3; @@ -173,10 +167,12 @@ vec3 get_material_properties(in int obj_id, in vec3 surface_point, in vec2 scree color = srgb(0.78, 0.31, 0.61); ambient = 0.2; } else { - fog = 0; + fog *= (1 - smoothstep(-0.0, 0.2, screen_point.y)); + // fog = 0; + // color = mix(color, vec3(1, 0, 0), (1 - smoothstep(0.0, 0.2, screen_point.y)) * (0.2 + fbm(screen_point * 10))); } - color += fog; + color += fog * (0.2 + fbm(screen_point * 10)); return color; } |
