LD54/res/shaders/colorize.tres

20 lines
440 B
Plaintext
Raw Normal View History

[gd_resource type="ShaderMaterial" load_steps=2 format=2]
[sub_resource type="Shader" id=3]
code = "shader_type canvas_item;
uniform bool active = false;
uniform vec4 color: hint_color = vec4(1, 1, 1, 1);
void fragment(){
COLOR = texture(TEXTURE, UV);
if (active) {
COLOR = vec4(COLOR.rgb + color.rgb * color.a, COLOR.a)
}
}"
[resource]
shader = SubResource( 3 )
2023-10-01 19:07:22 +03:00
shader_param/active = true
shader_param/color = Color( 1, 1, 1, 0 )