resized textures, first draft of moving. TODO: Use cubecoordinates EVERYWHERE. Find out a way to check if moving would break a hive
This commit is contained in:
parent
aa4343309c
commit
b9df0b4361
68 changed files with 1509 additions and 17 deletions
24
InsectTiles/HoverShader.gdshader
Normal file
24
InsectTiles/HoverShader.gdshader
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
shader_type spatial;
|
||||
//Simple 3D shader to create a force-field effect inspired by Faultless Defense from Guilty Gear Xrd.
|
||||
//In summary, it takes logic used for simple rim lighting and uses it to create the alpha instead.
|
||||
|
||||
render_mode unshaded;//depth_test_disable;
|
||||
uniform vec4 albedo : source_color;
|
||||
uniform vec4 emission_color : source_color;
|
||||
uniform float emission_amount: hint_range(0.0, 16.0) = 5.0f;
|
||||
uniform float rim_steepness : hint_range(0.0f, 16.0f) = 3.0f; //higher values mean a smaller rim.
|
||||
|
||||
|
||||
void vertex() {
|
||||
//UV=UV*uv_scale.xy+uv_offset.xy;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 base_uv = UV;
|
||||
ALBEDO = albedo.rgb;
|
||||
EMISSION = emission_color.rgb * emission_amount;
|
||||
//float PI = 3.14159265359;
|
||||
float NdotV = dot(NORMAL, VIEW);
|
||||
float rim_light = pow(1.0 - NdotV, rim_steepness);
|
||||
ALPHA = rim_light * emission_color.a;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue