Adding sound and music
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user