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

19 lines
486 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>=0.0f){
COLOR.a=30.64*newAlpha*length(fromCenterVec);
} else COLOR.a=0.0f;
}"
[resource]
shader = SubResource( 1 )
shader_param/alphaChannel = 0.09