game: use shader for enemy on-hit visual
This commit is contained in:
8
assets/shaders/hit_flash.gdshader
Normal file
8
assets/shaders/hit_flash.gdshader
Normal file
@@ -0,0 +1,8 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float flash_amount : hint_range(0.0, 1.0) = 0.0; // 0 = normal, 1 = full white
|
||||
|
||||
void fragment() {
|
||||
vec4 tex_color = texture(TEXTURE, UV);
|
||||
COLOR = mix(tex_color, vec4(1.0, 1.0, 1.0, tex_color.a), flash_amount);
|
||||
}
|
1
assets/shaders/hit_flash.gdshader.uid
Normal file
1
assets/shaders/hit_flash.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://p7evv1wldgsa
|
Reference in New Issue
Block a user