Don't allow certain shaders twice
This commit is contained in:
parent
d290d00b12
commit
fbbc93ab2c
3 changed files with 11 additions and 8 deletions
|
@ -35,9 +35,9 @@ func _ready() -> void:
|
|||
|
||||
var shader_name: String = \"\".join(shader.get_meta(\"shader_name\"));
|
||||
|
||||
print(shader.get_meta(\"shader_name\"))
|
||||
match shader_name:
|
||||
\"pixelate\":
|
||||
shaders.remove_at(shaders.find(shader, 0));
|
||||
print(\"pixelate\")
|
||||
material.set_shader_parameter(\"x_pixel_size\", randi_range(1, 5));
|
||||
material.set_shader_parameter(\"y_pixel_size\", randi_range(1, 5));
|
||||
|
@ -49,10 +49,12 @@ func _ready() -> void:
|
|||
material.set_shader_parameter(\"attenuation\", randf_range(2.0, 5.0));
|
||||
|
||||
\"kaleidoscope\":
|
||||
shaders.remove_at(shaders.find(shader, 0));
|
||||
print(\"kaleidoscope\")
|
||||
material.set_shader_parameter(\"segments\", float(randi_range(5.0, 8.0)));
|
||||
material.set_shader_parameter(\"segments\", float(randi_range(3.0, 5.0)));
|
||||
|
||||
\"pixelsort\":
|
||||
shaders.remove_at(shaders.find(shader, 0));
|
||||
print(\"pixelsort\")
|
||||
material.set_shader_parameter(\"sort\", randf_range(0.1, 2.6));
|
||||
|
||||
|
@ -286,6 +288,7 @@ stretch_mode = 6
|
|||
[node name="AutoScale" parent="KaleidoViewport" instance=ExtResource("2_7v8f2")]
|
||||
|
||||
[node name="TextMask" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
material = SubResource("ShaderMaterial_ahqjw")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
|
|
Loading…
Reference in a new issue