Newer
Older
DungeonShooting / DungeonShooting_Godot / resource / material / Blend.gdshader
@小李xl 小李xl on 25 Jun 2023 347 bytes 添加受到伤害后的无敌时间
shader_type canvas_item;

uniform vec4 blend : source_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform float schedule = 0.0;
uniform float alpha = 1.0;

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