Newer
Older
DungeonShooting / resource / materlal / Shadow.gdshader
@小李xl 小李xl on 17 Jun 2022 328 bytes 泛光shader和切换武器的代码修改
shader_type canvas_item;

uniform vec4 shadowColor : hint_color = vec4(0.0, 0.0, 0.0, 0.8);
uniform float schedule = 1.0;
//将贴图渲染为阴影

void fragment() {
	vec4 textureColor = texture(TEXTURE, UV);
	vec4 col = mix(textureColor, shadowColor, schedule);
	COLOR = mix(vec4(0.0, 0.0, 0.0, 0.0), col, textureColor.a);
}