feat: implemented powerup shield shader
This commit is contained in:
parent
65dc5fc228
commit
86fa195acf
3 changed files with 20 additions and 0 deletions
9
project/assets/effects/kaleidoscope_shield.gdshader
Normal file
9
project/assets/effects/kaleidoscope_shield.gdshader
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
shader_type spatial;
|
||||
|
||||
uniform sampler2D color : source_color, hint_default_white;
|
||||
uniform float baseline_alpha : hint_range(0, 1);
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = texture(color, UV * VIEW.xy).rgb;
|
||||
ALPHA = baseline_alpha + (1.0 - dot(NORMAL, VIEW)) * (1.0 - baseline_alpha);
|
||||
}
|
||||
1
project/assets/effects/kaleidoscope_shield.gdshader.uid
Normal file
1
project/assets/effects/kaleidoscope_shield.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b3gr12o27c4ah
|
||||
10
project/assets/effects/kaleidoscope_shield.tres
Normal file
10
project/assets/effects/kaleidoscope_shield.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[gd_resource type="ShaderMaterial" format=3 uid="uid://c2yn84yg4yspf"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://b3gr12o27c4ah" path="res://assets/effects/kaleidoscope_shield.gdshader" id="1_is1u6"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddaso2y8ooove" path="res://assets/materials/kaleidoscope_mosaic_albedo.png" id="2_7x4lx"]
|
||||
|
||||
[resource]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_is1u6")
|
||||
shader_parameter/color = ExtResource("2_7x4lx")
|
||||
shader_parameter/baseline_alpha = 0.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue