Floatbot assets added, and nodetunnel being implemented.

This commit is contained in:
2026-02-03 06:59:07 -05:00
parent b90fdaad98
commit e7570c78c3
105 changed files with 14184 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
[gd_resource type="ShaderMaterial" load_steps=5 format=3 uid="uid://ds825epdbvmpy"]
[ext_resource type="Shader" uid="uid://b6ke6r1fjb8s3" path="res://assets/BinbunVFX/impact_explosions/src/shader/explosion_core.gdshader" id="1_cumgj"]
[sub_resource type="Gradient" id="Gradient_o8yid"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_8jx1v"]
noise_type = 2
frequency = 0.02
fractal_octaves = 1
domain_warp_enabled = true
domain_warp_type = 2
domain_warp_amplitude = 5.0
domain_warp_fractal_octaves = 1
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_v36aq"]
seamless = true
color_ramp = SubResource("Gradient_o8yid")
noise = SubResource("FastNoiseLite_8jx1v")
[resource]
resource_local_to_scene = true
render_priority = 0
shader = ExtResource("1_cumgj")
shader_parameter/noise_texture = SubResource("NoiseTexture2D_v36aq")
shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/decay = 0.0
shader_parameter/proximity_fade = false
shader_parameter/proximity_fade_distance = 1.0
shader_parameter/alpha_mode = 0

View File

@@ -0,0 +1,46 @@
[gd_resource type="ShaderMaterial" load_steps=6 format=3 uid="uid://dnw08mtonx63d"]
[ext_resource type="Shader" uid="uid://b1sjgiq8o4tvd" path="res://experimental/BinbunVFX/impact_explosions/src/shader/explosion_smoke.gdshader" id="1_5yu7f"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_msnhc"]
seed = 2
fractal_type = 2
fractal_octaves = 3
fractal_gain = 0.55
domain_warp_enabled = true
domain_warp_type = 1
domain_warp_amplitude = 10.0
domain_warp_frequency = 0.02
domain_warp_fractal_octaves = 2
domain_warp_fractal_lacunarity = 4.165
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_plj08"]
noise = SubResource("FastNoiseLite_msnhc")
seamless = true
normalize = false
[sub_resource type="FastNoiseLite" id="FastNoiseLite_plj08"]
noise_type = 2
frequency = 0.04
fractal_octaves = 2
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_msnhc"]
width = 128
height = 128
noise = SubResource("FastNoiseLite_plj08")
seamless = true
invert = true
[resource]
render_priority = 0
shader = ExtResource("1_5yu7f")
shader_parameter/noise_texture = SubResource("NoiseTexture2D_msnhc")
shader_parameter/glow_noise_texture = SubResource("NoiseTexture2D_plj08")
shader_parameter/primary_color = Color(1, 0.662745, 0.0666667, 1)
shader_parameter/tertiary_color = Color(0.227451, 0.223529, 0.180392, 1)
shader_parameter/time_scale = Vector2(0, 0.3)
shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/noise_scale = 1.0
shader_parameter/proximity_fade = false
shader_parameter/proximity_fade_distance = 1.0
shader_parameter/alpha_mode = 0

View File

@@ -0,0 +1,28 @@
[gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://ckmhsplln2t4v"]
[ext_resource type="Shader" uid="uid://7acg1ejnsqij" path="res://assets/BinbunVFX/impact_explosions/src/shader/impact_streaks.gdshader" id="1_q4j6j"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_6ypje"]
noise_type = 2
frequency = 0.02
offset = Vector3(412.7, 0, 0)
fractal_octaves = 2
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_6ypje"]
seamless = true
seamless_blend_skirt = 0.5
noise = SubResource("FastNoiseLite_6ypje")
[resource]
render_priority = 0
shader = ExtResource("1_q4j6j")
shader_parameter/noise_texture = SubResource("NoiseTexture2D_6ypje")
shader_parameter/primary_color = Color(0, 0, 0, 1)
shader_parameter/secondary_color = Color(0, 0, 0, 1)
shader_parameter/texture_scale = Vector2(4, 0.2)
shader_parameter/time_scale = 0.4
shader_parameter/grow = 0.05
shader_parameter/decay = 0.0
shader_parameter/proximity_fade = false
shader_parameter/proximity_fade_distance = 1.0
shader_parameter/alpha_mode = 0

View File

@@ -0,0 +1,78 @@
shader_type spatial;
render_mode blend_mix, unshaded, cull_disabled;
uniform sampler2D mask_texture;
uniform sampler2D noise_texture;
uniform float edge_smoothness : hint_range(0.0, 1.0, 0.0) = 0.5;
uniform float color_smoothness : hint_range(0.0, 1.0, 0.1) = 1.0;
uniform vec4 primary_color : source_color;
uniform vec4 secondary_color : source_color;
uniform bool billboard = true;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
void vertex() {
if(billboard){
// Billboard Mode: Particles
mat4 mat_world = mat4(
normalize(INV_VIEW_MATRIX[0]),
normalize(INV_VIEW_MATRIX[1]),
normalize(INV_VIEW_MATRIX[2]),
MODEL_MATRIX[3]);
mat_world = mat_world * mat4(
vec4(cos(INSTANCE_CUSTOM.x), -sin(INSTANCE_CUSTOM.x), 0.0, 0.0),
vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0),
vec4(0.0, 0.0, 1.0, 0.0),
vec4(0.0, 0.0, 0.0, 1.0));
MODELVIEW_MATRIX = VIEW_MATRIX * mat_world;
// Billboard Keep Scale: Enabled
MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(
vec4(length(MODEL_MATRIX[0].xyz), 0.0, 0.0, 0.0),
vec4(0.0, length(MODEL_MATRIX[1].xyz), 0.0, 0.0),
vec4(0.0, 0.0, length(MODEL_MATRIX[2].xyz), 0.0),
vec4(0.0, 0.0, 0.0, 1.0));
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
}
}
void fragment() {
float mask = texture(mask_texture, UV).r;
float noise = texture(noise_texture, UV + vec2(COLOR.r)).r;
float masked_noise = mask - (1.0 - (noise));
float color_value = smoothstep(0.5 - color_smoothness * 0.5,0.5 + color_smoothness * 0.5,masked_noise);
float alpha = smoothstep(0.5 - edge_smoothness * 0.5,0.5 + edge_smoothness * 0.5,masked_noise) * COLOR.a;
//float color_value = smoothstep(0.0,color_smoothness, masked_noise);
ALBEDO = (mix(secondary_color, primary_color, color_value).rgb + COLOR.rgb) * 2.0;
EMISSION = ALBEDO;
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}

View File

@@ -0,0 +1 @@
uid://cssforqq3llvn

View File

@@ -0,0 +1,55 @@
shader_type spatial;
render_mode blend_mix, unshaded;
uniform sampler2D mask_texture;
uniform sampler2D noise_texture;
uniform float edge_smoothness : hint_range(0.0, 1.0, 0.0) = 0.5;
uniform float color_smoothness : hint_range(0.0, 1.0, 0.1) = 1.0;
uniform vec4 tertiary_color : source_color;
uniform float alpha_multiplier : hint_range(0.0, 1.0, 0.1) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
void vertex() {
mat4 modified_model_view = VIEW_MATRIX * mat4(
INV_VIEW_MATRIX[0],
INV_VIEW_MATRIX[1],
INV_VIEW_MATRIX[2],
MODEL_MATRIX[3]
);
MODELVIEW_MATRIX = modified_model_view;
}
void fragment() {
float mask = texture(mask_texture, UV).r;
float noise = texture(noise_texture, UV + vec2(COLOR.r)).r;
float masked_noise = mask - (1.0 - (noise - pow(COLOR.a, 4.0)));
float alpha = smoothstep(0.5 - edge_smoothness * 0.5,0.5 + edge_smoothness * 0.5,masked_noise) * alpha_multiplier;
//float color_value = smoothstep(0.0,color_smoothness, masked_noise);
ALBEDO = tertiary_color.rgb;
//EMISSION = ALBEDO * 2.0;
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://ccd4kg68n7uox

View File

@@ -0,0 +1,63 @@
shader_type spatial;
render_mode blend_mix, cull_disabled;
uniform sampler2D noise_texture;
uniform sampler2D glow_noise_texture;
uniform vec4 primary_color : source_color;
uniform vec2 texture_scale = vec2(1.0);
uniform float decay = 0.0;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
float noise(vec2 uv) {
float noise = texture(noise_texture, uv * texture_scale + vec2(TIME * 0.2)).r;
return noise;
}
void vertex() {
VERTEX = VERTEX + (NORMAL * noise(UV) * pow(decay, 0.5) * 0.3) + (NORMAL * pow(decay, 0.3)*0.1);
}
void fragment() {
float noise = noise(UV);
float alpha = 1.0 - smoothstep(noise, 1.0, decay);
alpha = smoothstep(0.9, 1.0, alpha);
ALBEDO = mix(vec3(1.0), primary_color.rgb, decay);
ROUGHNESS = 1.0;
EMISSION = ALBEDO * ((1.0-decay) * 2.0);
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://b6ke6r1fjb8s3

View File

@@ -0,0 +1,61 @@
shader_type spatial;
render_mode blend_mix, cull_disabled;
uniform sampler2D noise_texture;
uniform sampler2D glow_noise_texture;
uniform vec4 primary_color : source_color;
uniform vec2 texture_scale = vec2(1.0);
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
float noise(vec2 uv) {
float noise = texture(noise_texture, uv * texture_scale + vec2(TIME * 0.2)).r;
return noise;
}
void vertex() {
VERTEX = VERTEX + (NORMAL * noise(UV) * pow(COLOR.a, 0.5) * 0.3) + (NORMAL * pow(COLOR.a, 0.3)*0.1);
}
void fragment() {
float noise = noise(UV);
float alpha = 1.0 - smoothstep(noise, 1.0, COLOR.a);
alpha = smoothstep(0.9, 1.0, alpha);
ALBEDO = mix(vec3(1.0), primary_color.rgb, COLOR.a);
ROUGHNESS = 1.0;
EMISSION = ALBEDO * ((1.0-COLOR.a) * 2.0);
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://de7cy2qqnf2p5

View File

@@ -0,0 +1,89 @@
shader_type spatial;
render_mode blend_mix, depth_prepass_alpha, cull_back, diffuse_burley, specular_schlick_ggx;
uniform sampler2D noise_texture;
uniform sampler2D glow_noise_texture;
uniform vec4 primary_color : source_color;
uniform vec4 tertiary_color : source_color;
uniform vec2 time_scale = vec2(1.0);
uniform vec2 texture_scale = vec2(1.0);
uniform float noise_scale = 1.0;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
float fresnel(float amount, vec3 normal, vec3 view)
{
return pow((1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0 )), amount);
}
float noise(vec2 uv){
float uv_mask1 = pow(uv.y, 0.2);
float uv_mask2 = pow(1.0-uv.y, 0.2);
float uv_mask = min(uv_mask1, uv_mask2);
vec2 noise_uv = (uv * texture_scale) + vec2(TIME) * time_scale;
float noise = texture(noise_texture, noise_uv).r * uv_mask;
return noise;
}
void vertex() {
float n = noise(UV);
n = pow(n, 0.5);
vec3 offset = (NORMAL * n);
VERTEX += offset * noise_scale;
}
void fragment() {
ROUGHNESS = 1.0;
float glow_amount = COLOR.r;
float glow_n = texture(glow_noise_texture, UV + vec2(TIME) * time_scale * 0.5).r;
float n = pow(1.0 - noise(UV), 0.5) * (mix(glow_n, 1.0, .7));
float glow = smoothstep(1.0 - glow_amount, 1.0, n);
vec4 color = mix(tertiary_color, primary_color, glow);
ALBEDO = color.rgb;
EMISSION = (ALBEDO * 4.0) * glow;
// ALPHA
float decay_amount = 1.0 - COLOR.a;
float alpha = smoothstep(decay_amount - 0.2, decay_amount, glow_n*0.8);//
alpha *= 1.0 - fresnel(3.0, NORMAL, VIEW);
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://b1sjgiq8o4tvd

View File

@@ -0,0 +1,70 @@
shader_type spatial;
render_mode blend_mix, cull_disabled;
uniform sampler2D ring_texture;
uniform sampler2D noise_texture;
uniform vec4 primary_color : source_color;
uniform vec4 secondary_color : source_color;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
void vertex() {
// Called for every vertex the material is visible on.
}
float noise_fade(float v, float n, float amt, float treshold){
float value = 1.0;
float n_amt = amt * 2.0;
value = mix(v, v - (1.0-(n * treshold)), n_amt);
value = clamp(value, 0.0, 1.0);
return value;
}
void fragment() {
float ring_mask = texture(ring_texture, UV).r;
float noise = texture(noise_texture, UV).r;
float decay = (1.0 - pow(COLOR.a,0.5)) * 3.0;
float value = noise_fade(ring_mask, noise, decay, 0.7);
vec4 color = mix(secondary_color, primary_color, value);
ALBEDO = mix(color.rgb, vec3(1.0), pow(COLOR.a, 8.0));
EMISSION = ALBEDO * 2.0;
float alpha = smoothstep(0.1,0.5, value);
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://bf8eiigjam2fr

View File

@@ -0,0 +1,49 @@
shader_type spatial;
render_mode blend_mix, unshaded;
uniform vec4 primary_color : source_color;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform float alpha_multiplier : hint_range(0.0,1.0,0.05) = 0.432;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
float fresnel(float amount, vec3 normal, vec3 view)
{
return pow((1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0 )), amount);
}
void fragment() {
float alpha = pow(1.0 - fresnel(1.0,NORMAL, VIEW), 16.0) * alpha_multiplier;
ALBEDO = primary_color.rgb;
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://d4eb3cue1817u

View File

@@ -0,0 +1,65 @@
shader_type spatial;
render_mode blend_mix;
uniform sampler2D shape_texture;
uniform sampler2D noise_texture;
uniform vec4 primary_color : source_color;
uniform vec4 secondary_color : source_color;
uniform float decay : hint_range(0.0,1.0,0.01);
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
float shape(vec2 uv){
float s = texture(shape_texture, uv).r;
return s;
}
float wave(vec2 uv){
float s = pow(shape(uv),0.4);
float mask1 = shape(uv);
float mask2 = pow(1.0 - shape(uv),2.0);
float w = sin(s * 16.0 + (TIME * 16.0));
w = (w + 1.0) / 2.0;
w *= mask1 - pow(1.0 - decay, 8.0);
w *= 1.0 + mask2 - pow(decay * 2.0, 1.0);
w = clamp(w, 0.0, 1.0);
return w * 8.0;
}
void vertex() {
VERTEX += NORMAL * wave(UV) * 0.1;
}
void fragment() {
float wave_value = wave(UV);
float noise = texture(noise_texture, UV).r;
float alpha = clamp(wave_value - noise, 0.0, 1.0);
vec3 color = mix(secondary_color, primary_color, wave_value).rgb;
ALBEDO = color;
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://dw1bkef40wjyi

View File

@@ -0,0 +1,62 @@
shader_type spatial;
render_mode blend_mix, cull_disabled, depth_prepass_alpha;
uniform sampler2D noise_texture;
uniform vec4 primary_color : source_color;
uniform vec4 secondary_color : source_color;
uniform vec2 texture_scale = vec2(1.0);
uniform vec2 time_scale = vec2(1.0);
uniform float grow : hint_range(0.0, 1.0, 0.01) = 0.34;
uniform float decay : hint_range(0.0, 1.0, 0.01) = 0.34;
uniform bool proximity_fade = false;
uniform float proximity_fade_distance : hint_range(0.0, 4096.0, 0.01) = 1.0;
uniform int alpha_mode : hint_range(0, 2, 1) = 0;
const vec3 ign = vec3(0.06711056f, 0.00583715f, 52.9829189f);
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
float noise = texture(noise_texture, (UV * texture_scale + (vec2(TIME) * time_scale))).r;
float mask = UV.y;
float masked_noise = noise * mask;
float alpha = smoothstep(grow,grow + 0.1,masked_noise);
alpha *= decay;
ALBEDO = mix(secondary_color.rgb, primary_color.rgb, UV.y);
EMISSION = ALBEDO * 3.0;
// Proximity Fade: Enabled
if(proximity_fade){
float proximity_depth_tex = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec4 proximity_view_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, proximity_depth_tex, 1.0);
proximity_view_pos.xyz /= proximity_view_pos.w;
alpha *= clamp(1.0 - smoothstep(proximity_view_pos.z + proximity_fade_distance, proximity_view_pos.z, VERTEX.z), 0.0, 1.0);
}
if(alpha_mode == 0){
ALPHA = alpha;
} else if (alpha_mode == 1) {
if (alpha < 0.001 || alpha < fract(ign.z * fract(dot(FRAGCOORD.xy, ign.xy)))) {
discard;
}
} else if (alpha_mode == 2) {
if (alpha < 0.2){
discard;
}
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://7acg1ejnsqij

View File

@@ -0,0 +1,23 @@
shader_type spatial;
render_mode blend_mix;
uniform sampler2D shape_texture;
uniform vec4 primary_color : source_color;
uniform vec4 secondary_color : source_color;
void fragment() {
float mask = texture(shape_texture, UV).r;
ALBEDO = mix(secondary_color, primary_color, mask).rgb;
EMISSION = ALBEDO * 4.0;
if (mask < .1){
discard;
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://d28ltkmbbdcjb