Adding sound and music

This commit is contained in:
2024-09-01 18:16:06 +02:00
parent dfade2fc63
commit 78921a780c
35 changed files with 355 additions and 17 deletions

View File

@@ -27,31 +27,31 @@ void fragment() {
float value = pixel_color.x;
if (dimension == 1) value = pixel_color.y;
if (dimension == 2) value = pixel_color.z;
vec4 color = texture(texture_medium, vert/texture_size);
if (value < texture_low_threshold)
color =
color =
min(
(texture_low_threshold - value) / smooth_change_range,
(texture_low_threshold - value) / smooth_change_range,
1.0
) * texture(texture_low, vert/texture_size)
) * texture(texture_low, vert/texture_size)
+ (1.0 - min(
(texture_low_threshold - value) / smooth_change_range,
(texture_low_threshold - value) / smooth_change_range,
1.0
)
) * texture(texture_medium, vert/texture_size);
if (value > texture_high_threshold)
color =
color =
min(
(value - texture_high_threshold) / smooth_change_range,
(value - texture_high_threshold) / smooth_change_range,
1.0
) * texture(texture_high, vert/texture_size)
) * texture(texture_high, vert/texture_size)
+ (1.0 - min(
(value - texture_high_threshold) / smooth_change_range,
(value - texture_high_threshold) / smooth_change_range,
1.0
)
) * texture(texture_medium, vert/texture_size);
COLOR = color;
}