One_Eleven_Android/resources/materials/simple_darkening.tres
2024-11-10 03:34:28 +03:00

21 lines
517 B
Text

[gd_resource type="ShaderMaterial" load_steps=2 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform float alphaChannel=1;
void fragment() {
//vec4 pixelColor = texture(TEXTURE, UV);
COLOR = texture(TEXTURE, UV);
//float newAlpha=(alphaChannel);
//vec2 fromCenterVec=UV.xy-vec2(0.5,0.5);
//if (newAlpha>=0f){
// COLOR.a=30.64*newAlpha*length(fromCenterVec);
//} else COLOR.a=0f;
COLOR.a=alphaChannel;
}"
[resource]
shader = SubResource( 1 )
shader_param/alphaChannel = 0.2