Move files and folders to new repo format to enable multi-project format
@@ -0,0 +1,30 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://n1p83m0uo03v"
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/Weapon Strikes/._NON ELEMENTAL SLASH.png"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/Weapon Strikes/NON ELEMENTAL SLASH.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b5qjlbcesth53"
|
||||
path="res://.godot/imported/NON ELEMENTAL SLASH.png-1bf909eeddb451e3f6e33c698e2e53e1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/Weapon Strikes/NON ELEMENTAL SLASH.png"
|
||||
dest_files=["res://.godot/imported/NON ELEMENTAL SLASH.png-1bf909eeddb451e3f6e33c698e2e53e1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/hit_effects/FIRE_STRIKE_1.0.png
Normal file
|
After Width: | Height: | Size: 452 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c6r3dhnkuw22w"
|
||||
path="res://.godot/imported/FIRE_STRIKE_1.0.png-559ebdca8bed9db1db96b1d1b2d8f353.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/hit_effects/FIRE_STRIKE_1.0.png"
|
||||
dest_files=["res://.godot/imported/FIRE_STRIKE_1.0.png-559ebdca8bed9db1db96b1d1b2d8f353.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/hit_effects/WATER_STRIKE_1.0.png
Normal file
|
After Width: | Height: | Size: 652 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dw41v352onc0a"
|
||||
path="res://.godot/imported/WATER_STRIKE_1.0.png-e7137b942ece3c27aab46a2703843a54.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/hit_effects/WATER_STRIKE_1.0.png"
|
||||
dest_files=["res://.godot/imported/WATER_STRIKE_1.0.png-e7137b942ece3c27aab46a2703843a54.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/hit_effects/explosion.png
Normal file
|
After Width: | Height: | Size: 488 KiB |
34
Zennysoft.Game.Ma/src/vfx/hit_effects/explosion.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://npwcgmo2hi1t"
|
||||
path="res://.godot/imported/explosion.png-8174f81734413e849902e37c0ddda01d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/hit_effects/explosion.png"
|
||||
dest_files=["res://.godot/imported/explosion.png-8174f81734413e849902e37c0ddda01d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/playerdot.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
34
Zennysoft.Game.Ma/src/vfx/playerdot.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://mjobx7ph7hf1"
|
||||
path="res://.godot/imported/playerdot.png-ab7557c4bead4be1a9920776a1d00f40.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/playerdot.png"
|
||||
dest_files=["res://.godot/imported/playerdot.png-ab7557c4bead4be1a9920776a1d00f40.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
29
Zennysoft.Game.Ma/src/vfx/shaders/DamageHit.gdshader
Normal file
@@ -0,0 +1,29 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
/**
|
||||
Color to use for the shock.
|
||||
*/
|
||||
uniform vec3 shock_color : source_color = vec3(1.0, 0.0, 0.0);
|
||||
/**
|
||||
Initial amplitude of the shock. This will start at this amplitude and
|
||||
gradually attenuate.
|
||||
*/
|
||||
uniform float amplitude = 30.0;
|
||||
|
||||
uniform float progress: hint_range(0.0, 1.0) = -1.0;
|
||||
/**
|
||||
How fast shold it move side to side, more frequency means it'll move more quickly
|
||||
side to side.
|
||||
*/
|
||||
uniform float frequecy = 10.0;
|
||||
|
||||
void vertex() {
|
||||
float exponent = mod(progress, 3.0);
|
||||
VERTEX.x += amplitude * exp(-3.0*exponent) * sin(frequecy*exponent);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float exponent = mod(progress, 3.0);
|
||||
vec3 normal_color = texture(TEXTURE, UV).rgb;
|
||||
COLOR.rgb = normal_color + shock_color * exp(-3.0*exponent);
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/vfx/shaders/DamageHit.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjvysm0rhhdgi
|
||||
9
Zennysoft.Game.Ma/src/vfx/shaders/DamageHit.tres
Normal file
@@ -0,0 +1,9 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://c0gpeve05njqq"]
|
||||
|
||||
[ext_resource type="Shader" path="res://src/vfx/shaders/PixelMelt.gdshader" id="1_ibjx1"]
|
||||
|
||||
[resource]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("1_ibjx1")
|
||||
shader_parameter/progress = 1.0
|
||||
shader_parameter/meltiness = 1.0
|
||||
33
Zennysoft.Game.Ma/src/vfx/shaders/PixelMelt.gdshader
Normal file
@@ -0,0 +1,33 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
// Animate from 0 to 1
|
||||
uniform float progress: hint_range(0.0, 1.0) = 0.0;
|
||||
|
||||
// How jagged each band of melting pixels are
|
||||
uniform float meltiness: hint_range(0.0, 16.0) = 1.0;
|
||||
|
||||
uniform bool reverse = false;
|
||||
|
||||
float psuedo_rand(float x) {
|
||||
return mod(x * 2048103.0 + cos(x * 1912.0), 1.0);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV;
|
||||
|
||||
// Move pixels near the top faster
|
||||
if (reverse)
|
||||
uv.y += progress / UV.y;
|
||||
else
|
||||
uv.y -= progress / UV.y;
|
||||
|
||||
// Created jagged edges for each pixel on the x-axis
|
||||
uv.y -= progress * meltiness * psuedo_rand(UV.x - mod(UV.x, TEXTURE_PIXEL_SIZE.x));
|
||||
|
||||
COLOR = texture(TEXTURE, uv);
|
||||
|
||||
// "delete" pixels out of range
|
||||
if (uv.y <= 0.0) {
|
||||
COLOR.a = 0.0;
|
||||
}
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/vfx/shaders/PixelMelt.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dqu4qa2xoa8bf
|
||||
@@ -0,0 +1,83 @@
|
||||
shader_type spatial;
|
||||
|
||||
render_mode cull_disabled, unshaded;
|
||||
uniform sampler2D depth_texture : source_color, hint_depth_texture;
|
||||
uniform sampler2D screen_texture : source_color, hint_screen_texture, repeat_disable, filter_nearest;
|
||||
|
||||
uniform bool enable_fog = true;
|
||||
uniform vec3 fog_color : source_color;
|
||||
uniform vec3 noise_color : source_color;
|
||||
uniform float fog_distance : hint_range(1, 6000) = 100;
|
||||
uniform float fog_fade_range : hint_range(1, 6000) = 50;
|
||||
uniform bool enable_noise = true;
|
||||
uniform float noise_time_fac : hint_range(0.1, 10) = 4;
|
||||
uniform bool enable_color_limitation = true;
|
||||
uniform int color_levels : hint_range(2, 256) = 32;
|
||||
uniform bool enable_dithering = true;
|
||||
uniform float dither_strength : hint_range(0.0, 1.0) = 0.3;
|
||||
|
||||
float hashOld12(vec2 p){
|
||||
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453 + (sin((TIME)) / noise_time_fac)) ;
|
||||
}
|
||||
|
||||
vec3 color_mix(vec3 a, vec3 b, float f ){
|
||||
f = clamp(abs(f), 0,1);
|
||||
float invf = 1.0 - f;
|
||||
return (a*f) + (b*invf);
|
||||
}
|
||||
|
||||
vec3 quantize_color(vec3 color, int levels) {
|
||||
float quantizer = float(levels - 1);
|
||||
return floor(color * quantizer + 0.5) / quantizer;
|
||||
}
|
||||
|
||||
float dither(vec2 position, float brightness) {
|
||||
int x = int(mod(position.x, 4.0));
|
||||
int y = int(mod(position.y, 4.0));
|
||||
int index = x + y * 4;
|
||||
float dithering[16] = float[](
|
||||
0.0, 0.5, 0.125, 0.625,
|
||||
0.75, 0.25, 0.875, 0.375,
|
||||
0.1875, 0.6875, 0.0625, 0.5625,
|
||||
0.9375, 0.4375, 1.0, 0.8125
|
||||
);
|
||||
float threshold = dithering[index];
|
||||
return brightness < threshold ? 0.0 : 1.0;
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
POSITION = vec4(VERTEX.xy, 1.0, 1.0);
|
||||
}
|
||||
|
||||
void fragment(){
|
||||
vec3 screen_color = texture(screen_texture, SCREEN_UV).rgb;
|
||||
vec2 screen_coords = SCREEN_UV * 2.0 - 1.0;
|
||||
float depth = texture(depth_texture, SCREEN_UV).x;
|
||||
vec3 ndc = vec3(screen_coords, depth);
|
||||
|
||||
vec4 view = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
|
||||
view.xyz /= view.w;
|
||||
|
||||
float linear_depth = -view.z;
|
||||
|
||||
float depth_mask_inv = clamp((linear_depth - (fog_distance - fog_fade_range)) / fog_fade_range, 0.0, 1.0);
|
||||
|
||||
vec3 final_color = screen_color;
|
||||
|
||||
if (enable_noise){
|
||||
vec3 twocolornoise = color_mix(fog_color, noise_color, hashOld12(screen_coords));
|
||||
final_color = color_mix(twocolornoise, final_color, depth_mask_inv);
|
||||
}
|
||||
if (enable_fog){
|
||||
final_color = color_mix(fog_color, final_color, depth_mask_inv);
|
||||
}
|
||||
if (enable_color_limitation){
|
||||
final_color = quantize_color(final_color, color_levels);
|
||||
}
|
||||
if (enable_dithering){
|
||||
float brightness = dot(final_color, vec3(0.3, 0.59, 0.11));
|
||||
brightness += dither_strength * (dither(FRAGCOORD.xy, brightness) - 0.5);
|
||||
final_color *= (1.0 + dither_strength * (dither(FRAGCOORD.xy, brightness) - 0.5));
|
||||
}
|
||||
ALBEDO = final_color;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://ekp7a5uh1x7j
|
||||
44
Zennysoft.Game.Ma/src/vfx/shaders/PostProcessing.gdshader
Normal file
@@ -0,0 +1,44 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded, shadows_disabled, depth_test_disabled, depth_draw_never;
|
||||
uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
uniform int color_depth : hint_range(1, 8) = 5;
|
||||
uniform bool dithering = true;
|
||||
uniform int resolution_scale = 4;
|
||||
|
||||
int dithering_pattern(ivec2 fragcoord) {
|
||||
const int pattern[] = {
|
||||
-4, +0, -3, +1,
|
||||
+2, -2, +3, -1,
|
||||
-3, +1, -4, +0,
|
||||
+3, -1, +2, -2
|
||||
};
|
||||
|
||||
int x = fragcoord.x % 4;
|
||||
int y = fragcoord.y % 4;
|
||||
|
||||
return pattern[y * 4 + x];
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
POSITION = vec4(VERTEX.xy, 1.0, 1.0);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ivec2 uv = ivec2(FRAGCOORD.xy / float(resolution_scale));
|
||||
vec3 color = texelFetch(SCREEN_TEXTURE, uv * resolution_scale, 0).rgb;
|
||||
|
||||
// Convert from [0.0, 1.0] range to [0, 255] range
|
||||
ivec3 c = ivec3(round(color * 255.0));
|
||||
|
||||
// Apply the dithering pattern
|
||||
if (dithering) {
|
||||
c += ivec3(dithering_pattern(uv));
|
||||
}
|
||||
|
||||
// Truncate from 8 bits to color_depth bits
|
||||
c >>= (8 - color_depth);
|
||||
|
||||
// Convert back to [0.0, 1.0] range
|
||||
ALBEDO = vec3(c) / float(1 << color_depth);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bo3urmmin5u1r
|
||||
65
Zennysoft.Game.Ma/src/vfx/shaders/sdf_noise.gdshaderinc
Normal file
@@ -0,0 +1,65 @@
|
||||
// http://iquilezles.org/www/articles/smin/smin.htm
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = max(k-abs(a-b),0.0);
|
||||
return min(a, b) - h*h*0.25/k;
|
||||
}
|
||||
|
||||
// http://iquilezles.org/www/articles/smin/smin.htm
|
||||
float smax( float a, float b, float k )
|
||||
{
|
||||
float h = max(k-abs(a-b),0.0);
|
||||
return max(a, b) + h*h*0.25/k;
|
||||
}
|
||||
|
||||
// https://iquilezles.org/www/articles/fbmsdf/fbmsdf.htm
|
||||
float sph( vec3 i, vec3 f, vec3 c )
|
||||
{
|
||||
// random radius at grid vertex i+c (please replace this hash by
|
||||
// something better if you plan to use this for a real application)
|
||||
vec3 p = 17.0*fract( (i+c)*0.3183099+vec3(0.11,0.17,0.13) );
|
||||
float w = fract( p.x*p.y*p.z*(p.x+p.y+p.z) );
|
||||
float r = 0.7*w*w;
|
||||
// distance to sphere at grid vertex i+c
|
||||
return length(f-c) - r;
|
||||
}
|
||||
|
||||
// https://iquilezles.org/www/articles/fbmsdf/fbmsdf.htm
|
||||
float sdBase( in vec3 p )
|
||||
{
|
||||
vec3 i = floor(p);
|
||||
vec3 f = fract(p);
|
||||
return min(min(min(sph(i,f,vec3(0,0,0)),
|
||||
sph(i,f,vec3(0,0,1))),
|
||||
min(sph(i,f,vec3(0,1,0)),
|
||||
sph(i,f,vec3(0,1,1)))),
|
||||
min(min(sph(i,f,vec3(1,0,0)),
|
||||
sph(i,f,vec3(1,0,1))),
|
||||
min(sph(i,f,vec3(1,1,0)),
|
||||
sph(i,f,vec3(1,1,1)))));
|
||||
}
|
||||
|
||||
// https://iquilezles.org/www/articles/fbmsdf/fbmsdf.htm
|
||||
float sdFbm(
|
||||
in vec3 p,
|
||||
in int detail,
|
||||
in float rough,
|
||||
in float inflate,
|
||||
in float smooth_fac,
|
||||
in float d)
|
||||
{
|
||||
float s = 1.0;
|
||||
for( int i=0; i < min(int(detail), 12); i++ )
|
||||
{
|
||||
float n = s*sdBase(p);
|
||||
|
||||
n = smax(n,d - inflate*s, smooth_fac*s );
|
||||
d = smin(n,d , smooth_fac*s );
|
||||
|
||||
p = mat3(vec3( 0.00, 1.60, 1.20),
|
||||
vec3(-1.60, 0.72,-0.96),
|
||||
vec3(-1.20,-0.96, 1.280))*p;
|
||||
s = rough*s;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bcn0ie6r76xqp
|
||||
80
Zennysoft.Game.Ma/src/vfx/shaders/void.gdshader
Normal file
@@ -0,0 +1,80 @@
|
||||
shader_type spatial;
|
||||
#include "sdf_noise.gdshaderinc"
|
||||
render_mode unshaded;
|
||||
render_mode depth_test_disabled, cull_front;
|
||||
|
||||
uniform sampler2D depth_texture : hint_depth_texture, filter_linear_mipmap;
|
||||
|
||||
group_uniforms Color;
|
||||
uniform float col_distance_scale = 1.0;
|
||||
uniform vec3 col_near : source_color = vec3(1.0);
|
||||
uniform vec3 col_far : source_color = vec3(0.0);
|
||||
uniform float emission_boost = 1.0;
|
||||
group_uniforms;
|
||||
|
||||
group_uniforms SDFNoise;
|
||||
uniform float sphere_radius = 0.5;
|
||||
uniform float noise_scale = 1.0;
|
||||
uniform int detail = 4;
|
||||
uniform float rough = 0.5;
|
||||
uniform float inflate = 0.1;
|
||||
uniform float smooth_fac = 0.2;
|
||||
uniform float step_mult = 1.0;
|
||||
group_uniforms;
|
||||
|
||||
mat3 y_rot(float angle) {
|
||||
return mat3(
|
||||
vec3(cos(angle), 0.0, -sin(angle)),
|
||||
vec3(0.0, 1.0, 0.0),
|
||||
vec3(sin(angle), 0.0, cos(angle))
|
||||
);
|
||||
}
|
||||
|
||||
float sdf_map(vec3 pos) {
|
||||
float sphere_dist = length(pos) - sphere_radius;
|
||||
|
||||
vec3 noise_offset = vec3(0.0, -TIME * 0.1, 0.0);
|
||||
|
||||
pos = y_rot(pos.y * 10.0) * pos;
|
||||
|
||||
pos = pos * noise_scale + noise_offset;
|
||||
|
||||
sphere_dist = sdFbm(pos, detail, rough, inflate, smooth_fac, sphere_dist);
|
||||
|
||||
return -sphere_dist;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float depth = texture(depth_texture, SCREEN_UV).x;
|
||||
vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth * 2.0 - 1.0);
|
||||
vec4 view_coords = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
|
||||
view_coords.xyz /= view_coords.w;
|
||||
|
||||
vec3 world_pos = (INV_VIEW_MATRIX * vec4(view_coords.xyz, 1.0)).xyz;
|
||||
vec3 obj_position = (inverse(MODEL_MATRIX) * vec4(world_pos, 1.0)).xyz;
|
||||
|
||||
vec3 cam_pos = (inverse(MODEL_MATRIX) * INV_VIEW_MATRIX * vec4(0.0, 0.0, 0.0, 1.0)).xyz;
|
||||
vec3 view_dir = normalize(obj_position - cam_pos);
|
||||
|
||||
vec3 cur_pos = obj_position;
|
||||
for (int i = 0; i < 50; i++) {
|
||||
float offset = sdf_map(cur_pos);
|
||||
|
||||
if (offset < -0.005) {break;}
|
||||
|
||||
cur_pos += view_dir * offset * step_mult;
|
||||
}
|
||||
|
||||
float cur_dist = sdf_map(cur_pos);
|
||||
|
||||
float alpha = 1.0 - clamp(cur_dist * -100.0, 0.0, 1.0);
|
||||
ALPHA = pow(alpha, 2.0);
|
||||
|
||||
float vol_depth = distance(obj_position, cur_pos);
|
||||
|
||||
float col_mix_fac = pow(1.0 - exp(-col_distance_scale * vol_depth), 2.0);
|
||||
|
||||
vec3 vol_color = mix(col_near, col_far, col_mix_fac);
|
||||
|
||||
ALBEDO = vol_color * emission_boost;
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/vfx/shaders/void.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://crufvy0tgbmto
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0000_Classic_30.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bokx3h8kfdo5i"
|
||||
path="res://.godot/imported/slash_0000_Classic_30.png-62602a4bea6b70260f0d3f4c854b822e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0000_Classic_30.png"
|
||||
dest_files=["res://.godot/imported/slash_0000_Classic_30.png-62602a4bea6b70260f0d3f4c854b822e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0001_Classic_29.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://byosr5gk51237"
|
||||
path="res://.godot/imported/slash_0001_Classic_29.png-a2c5b7daa803b51cc133bc3edd566285.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0001_Classic_29.png"
|
||||
dest_files=["res://.godot/imported/slash_0001_Classic_29.png-a2c5b7daa803b51cc133bc3edd566285.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0002_Classic_28.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://nh071o6ii03j"
|
||||
path="res://.godot/imported/slash_0002_Classic_28.png-67544ac9987966518d7537a6e1719a59.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0002_Classic_28.png"
|
||||
dest_files=["res://.godot/imported/slash_0002_Classic_28.png-67544ac9987966518d7537a6e1719a59.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0003_Classic_27.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bodfblud4kea3"
|
||||
path="res://.godot/imported/slash_0003_Classic_27.png-6f445ce101e9ea54bfeda842ed6b0aba.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0003_Classic_27.png"
|
||||
dest_files=["res://.godot/imported/slash_0003_Classic_27.png-6f445ce101e9ea54bfeda842ed6b0aba.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0004_Classic_26.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://de55prolicl0u"
|
||||
path="res://.godot/imported/slash_0004_Classic_26.png-8b74f286f3ecb1c6b24b364a6112cd6c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0004_Classic_26.png"
|
||||
dest_files=["res://.godot/imported/slash_0004_Classic_26.png-8b74f286f3ecb1c6b24b364a6112cd6c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/vfx/slash/slash_0005_Layer-1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bp0msic3uk3kc"
|
||||
path="res://.godot/imported/slash_0005_Layer-1.png-db55a7b50be18f92ffbe8351fade1a09.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/vfx/slash/slash_0005_Layer-1.png"
|
||||
dest_files=["res://.godot/imported/slash_0005_Layer-1.png-db55a7b50be18f92ffbe8351fade1a09.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||