<postprocess>, fix tab open/close, fix some URL bugs
This commit is contained in:
29
flumi/Shaders/chrome.gdshader
Normal file
29
flumi/Shaders/chrome.gdshader
Normal file
@@ -0,0 +1,29 @@
|
||||
// Chromatic Aberration Shader by https://godotshaders.com/shader/chromatic-abberation/
|
||||
// All credits to the original author!!!
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
uniform int levels = 3;
|
||||
uniform float spread = 0.01;
|
||||
|
||||
vec3 chromatic_slice(float t){
|
||||
vec3 res = vec3(1.0-t, 1.0 - abs(t - 1.0), t - 1.0);
|
||||
return max(res, 0.0);
|
||||
}
|
||||
|
||||
void fragment(){
|
||||
vec3 sum;
|
||||
COLOR.rgb = vec3(0);
|
||||
vec2 offset = (UV - vec2(0.5))*vec2(1,-1);
|
||||
for(int i = 0; i < levels; i++){
|
||||
float t = 2.0*float(i)/float(levels-1); // range 0.0->2.0
|
||||
vec3 slice = vec3(1.0-t, 1.0 - abs(t - 1.0), t - 1.0);
|
||||
slice = max(slice, 0.0);
|
||||
sum += slice;
|
||||
vec2 slice_offset = (t-1.0)*spread*offset;
|
||||
COLOR.rgb += slice * texture(SCREEN_TEXTURE, SCREEN_UV + slice_offset).rgb;
|
||||
}
|
||||
COLOR.rgb /= sum;
|
||||
}
|
||||
1
flumi/Shaders/chrome.gdshader.uid
Normal file
1
flumi/Shaders/chrome.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dbkni4dqt0ral
|
||||
90
flumi/Shaders/crt.gdshader
Normal file
90
flumi/Shaders/crt.gdshader
Normal file
@@ -0,0 +1,90 @@
|
||||
/* License CC BY-NC-SA 4.0 Deed */
|
||||
/* https://creativecommons.org/licenses/by-nc-sa/4.0/ */
|
||||
/* Fork of Ryk's VCR distortion shader */
|
||||
/* https://www.shadertoy.com/view/ldjGzV */
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D screen_texture: hint_screen_texture, filter_linear_mipmap, repeat_disable;
|
||||
|
||||
group_uniforms Image;
|
||||
uniform float curvature: hint_range(0., 10., .01) = 2.;
|
||||
uniform float skip: hint_range(0., 1., .01) = 1.;
|
||||
uniform float image_flicker: hint_range(0., 1., .01) = 1.;
|
||||
|
||||
group_uniforms Vignette;
|
||||
uniform float vignette_flicker_speed: hint_range(0., 2., .01) = 1.;
|
||||
uniform float vignette_strength: hint_range(0., 2., 0.01) = 1.;
|
||||
|
||||
group_uniforms Scanlines;
|
||||
uniform float small_scanlines_speed: hint_range(0., 10., .01) = 1.;
|
||||
uniform float small_scanlines_proximity: hint_range(.01, 2., .01) = 1.;
|
||||
uniform float small_scanlines_opacity: hint_range(0.01, 5., .01) = 1.;
|
||||
uniform float scanlines_opacity: hint_range(0., 2., .01) = 1.;
|
||||
uniform float scanlines_speed: hint_range(0., 5., .01) = 1.;
|
||||
uniform float scanline_thickness: hint_range(0., .6, .01) = 0.5;
|
||||
uniform float scanlines_spacing: hint_range(0.3, 3., .01) = 1.;
|
||||
|
||||
group_uniforms Noise;
|
||||
uniform sampler2D noise_texture: filter_linear_mipmap, repeat_enable;
|
||||
|
||||
float noise(vec2 p, vec2 uv)
|
||||
{
|
||||
float s = texture(noise_texture,vec2(1.*TIME,2.*TIME)*8. + p*1.).x;
|
||||
s *= s;
|
||||
return s;
|
||||
}
|
||||
|
||||
float onOff(float a, float b, float c)
|
||||
{
|
||||
return step(c, sin(TIME + a*cos(TIME*b)));
|
||||
}
|
||||
|
||||
float ramp(float y, float start, float end)
|
||||
{
|
||||
float inside = step(start,y) - step(end,y);
|
||||
float fact = (y-start)/(end-start)*inside;
|
||||
return (1.-fact) * inside;
|
||||
}
|
||||
|
||||
float stripes(vec2 uv)
|
||||
{
|
||||
float noi = noise(uv*vec2(0.5,1.) + vec2(1.,3.), uv)*scanlines_opacity;
|
||||
return ramp(mod(uv.y*4.*scanlines_spacing + TIME*scanlines_speed/(2.*scanlines_spacing)+sin(TIME*scanlines_speed + sin(TIME*scanlines_speed*0.63*scanlines_spacing)),1.),scanline_thickness,.6)*noi;
|
||||
}
|
||||
|
||||
vec3 getVideo(vec2 uv)
|
||||
{
|
||||
vec2 look = uv;
|
||||
float window = 1./(1.+20.*(look.y-mod(TIME/4.,1.))*(look.y-mod(TIME/4.,1.)))*image_flicker;
|
||||
look.x = look.x + sin(look.y*10. + TIME)/50.*onOff(4.,4.,.3)*(1.+cos(TIME*80.))*window;
|
||||
float vShift = 0.4*onOff(2.,3.,.9)*(sin(TIME)*sin(TIME*20.)+(0.5 + 0.1*sin(TIME*200.)*cos(TIME)))*skip;
|
||||
look.y = mod(look.y + vShift, 1.);
|
||||
vec3 video = texture(screen_texture,look).xyz;
|
||||
return video;
|
||||
}
|
||||
|
||||
vec2 screenDistort(vec2 uv)
|
||||
{
|
||||
uv -= vec2(.5,.5);
|
||||
uv = uv*1.2*(1./1.2+curvature*uv.x*uv.x*uv.y*uv.y);
|
||||
uv += vec2(.5,.5);
|
||||
return uv;
|
||||
}
|
||||
|
||||
void fragment()
|
||||
{
|
||||
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy;
|
||||
uv = screenDistort(uv);
|
||||
vec3 video = getVideo(uv);
|
||||
float vigAmt = 3.+.3*sin(TIME*vignette_flicker_speed+1. + 5.*cos(TIME*5.*vignette_flicker_speed+1.));
|
||||
vigAmt *= vignette_strength;
|
||||
float vignette = (1.-vigAmt*(uv.y-.5)*(uv.y-.5))*(1.-vigAmt*(uv.x-.5)*(uv.x-.5));
|
||||
|
||||
video += stripes(uv);
|
||||
video += noise(uv*2., uv)/2.;
|
||||
video *= vignette;
|
||||
video *= (12./small_scanlines_opacity+mod(uv.y*30.*small_scanlines_proximity+TIME*small_scanlines_speed,1.))/13.*small_scanlines_opacity;
|
||||
|
||||
COLOR = vec4(video,1.0);
|
||||
}
|
||||
1
flumi/Shaders/crt.gdshader.uid
Normal file
1
flumi/Shaders/crt.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://db3f2xubcujnq
|
||||
45
flumi/Shaders/dither.gdshader
Normal file
45
flumi/Shaders/dither.gdshader
Normal file
@@ -0,0 +1,45 @@
|
||||
//GODOT 4
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float pixel = 1.0;
|
||||
uniform sampler2D pallete;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
const float bit = 6.0;
|
||||
const mat4 bayer = mat4(
|
||||
vec4(1.0, 9.0, 3.0, 11.0),
|
||||
vec4(13.0, 5.0, 15.0, 7.0),
|
||||
vec4(4.0, 12.0, 2.0, 10.0),
|
||||
vec4(16.0, 8.0, 14.0, 6.0));
|
||||
|
||||
|
||||
float getbayer(int x, int y)
|
||||
{
|
||||
return bayer[x][y];
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 original = texture(TEXTURE, UV);
|
||||
|
||||
vec2 FUV = floor(FRAGCOORD.xy / pixel) / floor((1.0 / SCREEN_PIXEL_SIZE) / pixel);
|
||||
|
||||
vec4 _color = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||
vec4 color = _color * texture(pallete, vec2(_color.r, 1.0));
|
||||
|
||||
|
||||
float b = getbayer(int(FRAGCOORD.x) % 4, int(FRAGCOORD.y) % 4);// * 1.0) / 1.0;
|
||||
vec2 uv = FRAGCOORD.xy / SCREEN_PIXEL_SIZE;
|
||||
vec4 col_noise = color;
|
||||
vec3 noise = vec3(fract(sin(dot(FUV, vec2(12.9898, 78.233))) * 43758.5453));
|
||||
noise *= 0.1;
|
||||
noise.xy *= (b / 16.0) * 1.5;
|
||||
col_noise.rgb += noise; //noise effect
|
||||
|
||||
vec4 post = col_noise * floor(col_noise * 4.0) / 4.0; //noise + post-effect
|
||||
|
||||
COLOR *= post;
|
||||
|
||||
|
||||
}
|
||||
1
flumi/Shaders/dither.gdshader.uid
Normal file
1
flumi/Shaders/dither.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bggtn4uh67v0u
|
||||
20
flumi/Shaders/film.gdshader
Normal file
20
flumi/Shaders/film.gdshader
Normal file
@@ -0,0 +1,20 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
// Uniforms
|
||||
uniform sampler2D screen_texture : hint_screen_texture;
|
||||
uniform float grain_amount : hint_range(0.0, 1.0) = 0.05; // Adjust the amount of grain
|
||||
uniform float grain_size : hint_range(0.1, 10.0) = 1.0; // Adjust the size of the grain
|
||||
|
||||
void fragment() {
|
||||
// Sample the original screen texture
|
||||
vec4 original_color = texture(screen_texture, SCREEN_UV);
|
||||
|
||||
// Generate random noise
|
||||
float noise = (fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0;
|
||||
|
||||
// Add noise to the original color
|
||||
original_color.rgb += noise * grain_amount * grain_size;
|
||||
|
||||
// Clamp the final color to make sure it stays in the valid range
|
||||
COLOR = clamp(original_color, 0.0, 1.0);
|
||||
}
|
||||
1
flumi/Shaders/film.gdshader.uid
Normal file
1
flumi/Shaders/film.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bss3x1xthtaef
|
||||
32
flumi/Shaders/foliage.gdshader
Normal file
32
flumi/Shaders/foliage.gdshader
Normal file
@@ -0,0 +1,32 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
uniform float x_intensity = 3.0;
|
||||
uniform float y_intensity = 0.5;
|
||||
uniform float offset = 0.0;
|
||||
uniform float speed : hint_range(0, 20) = 2.0;
|
||||
uniform float wave_frequency : hint_range(0, 100) = 20;
|
||||
uniform float wave_length : hint_range(50, 800) = 200.0;
|
||||
|
||||
void fragment() {
|
||||
vec2 real_uv = UV;
|
||||
|
||||
vec2 vecToBottom = vec2(1, 1) - UV.y;
|
||||
float distToBottom = length(vecToBottom);
|
||||
|
||||
float final_speed = TIME * (speed / 4.0) + offset;
|
||||
|
||||
float time_var = (cos(final_speed) * cos(final_speed * 4.0) * cos(final_speed * 2.0))/(200.0);
|
||||
float time_var2 = (cos(final_speed) * cos(final_speed * 6.0) * cos(final_speed * 2.0))/(200.0);
|
||||
|
||||
float wave_from_x = (cos(real_uv.x * 100.0)/1000.0);
|
||||
float wave_large_from_x = cos(TIME + (real_uv.x * wave_frequency))/wave_length;
|
||||
|
||||
float offset_x = time_var * (distToBottom * x_intensity) + wave_from_x + (wave_large_from_x);
|
||||
float offset_y = time_var2 * (distToBottom * y_intensity);
|
||||
|
||||
vec2 distortion_offset = vec2(offset_x, offset_y);
|
||||
|
||||
COLOR = texture(SCREEN_TEXTURE, SCREEN_UV + distortion_offset);
|
||||
}
|
||||
1
flumi/Shaders/foliage.gdshader.uid
Normal file
1
flumi/Shaders/foliage.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://12ar0h66dukp
|
||||
1
flumi/Shaders/future.gdshader.uid
Normal file
1
flumi/Shaders/future.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c8nv7tds2neww
|
||||
95
flumi/Shaders/lensflare.gdshader
Normal file
95
flumi/Shaders/lensflare.gdshader
Normal file
@@ -0,0 +1,95 @@
|
||||
// TRANSLATED & MODIFIED FROM: https://www.shadertoy.com/view/4sX3Rs
|
||||
|
||||
shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
uniform vec2 sun_position = vec2(400.0, 0.0);
|
||||
uniform vec3 tint = vec3(1.4,1.2,1.0);
|
||||
uniform sampler2D noise_texture;
|
||||
|
||||
float noise_float(float t, vec2 texResolution)
|
||||
{
|
||||
return texture(noise_texture,vec2(t,0.0)/texResolution).x;
|
||||
}
|
||||
float noise_vec2(vec2 t, vec2 texResolution)
|
||||
{
|
||||
return texture(noise_texture,t/texResolution).x;
|
||||
}
|
||||
|
||||
vec3 lensflare(vec2 uv,vec2 pos, vec2 texResolution)
|
||||
{
|
||||
vec2 main = uv-pos;
|
||||
vec2 uvd = uv*(length(uv));
|
||||
|
||||
float ang = atan(main.x,main.y);
|
||||
float dist = length(main);
|
||||
dist = pow(dist,0.1);
|
||||
|
||||
float n = noise_vec2(vec2(ang*16.0,dist*32.0), texResolution);
|
||||
|
||||
// Do not need an artificial sun
|
||||
//float f0 = 1.0/(length(uv-pos)*16.0+1.0);
|
||||
//f0 = f0 + f0*(sin(noise_float(sin(ang*2.+pos.x)*4.0 - cos(ang*3.+pos.y), texResolution)*16.)*.1 + dist*.1 + .8);
|
||||
|
||||
float f1 = max(0.01-pow(length(uv+1.2*pos),1.9),.0)*7.0;
|
||||
|
||||
float f2 = max(1.0/(1.0+32.0*pow(length(uvd+0.8*pos),2.0)),.0)*00.25;
|
||||
float f22 = max(1.0/(1.0+32.0*pow(length(uvd+0.85*pos),2.0)),.0)*00.23;
|
||||
float f23 = max(1.0/(1.0+32.0*pow(length(uvd+0.9*pos),2.0)),.0)*00.21;
|
||||
|
||||
vec2 uvx = mix(uv,uvd,-0.5);
|
||||
|
||||
float f4 = max(0.01-pow(length(uvx+0.4*pos),2.4),.0)*6.0;
|
||||
float f42 = max(0.01-pow(length(uvx+0.45*pos),2.4),.0)*5.0;
|
||||
float f43 = max(0.01-pow(length(uvx+0.5*pos),2.4),.0)*3.0;
|
||||
|
||||
uvx = mix(uv,uvd,-.4);
|
||||
|
||||
float f5 = max(0.01-pow(length(uvx+0.2*pos),5.5),.0)*2.0;
|
||||
float f52 = max(0.01-pow(length(uvx+0.4*pos),5.5),.0)*2.0;
|
||||
float f53 = max(0.01-pow(length(uvx+0.6*pos),5.5),.0)*2.0;
|
||||
|
||||
uvx = mix(uv,uvd,-0.5);
|
||||
|
||||
float f6 = max(0.01-pow(length(uvx-0.3*pos),1.6),.0)*6.0;
|
||||
float f62 = max(0.01-pow(length(uvx-0.325*pos),1.6),.0)*3.0;
|
||||
float f63 = max(0.01-pow(length(uvx-0.35*pos),1.6),.0)*5.0;
|
||||
|
||||
vec3 c = vec3(.0);
|
||||
|
||||
c.r+=f2+f4+f5+f6; c.g+=f22+f42+f52+f62; c.b+=f23+f43+f53+f63;
|
||||
c = c*1.3 - vec3(length(uvd)*.05);
|
||||
|
||||
// Do not need an artificial sun
|
||||
//c+=vec3(f0);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
vec3 cc(vec3 color, float factor,float factor2) // color modifier
|
||||
{
|
||||
float w = color.x+color.y+color.z;
|
||||
return mix(color,vec3(w)*factor,w*factor2);
|
||||
}
|
||||
|
||||
void fragment()
|
||||
{
|
||||
vec2 texResolution = 1.0 / TEXTURE_PIXEL_SIZE;
|
||||
vec2 resolution = 1.0 / SCREEN_PIXEL_SIZE;
|
||||
|
||||
vec2 uv = FRAGCOORD.xy / resolution.xy - 0.5;
|
||||
uv.x *= resolution.x/resolution.y; //fix aspect ratio
|
||||
vec2 mouse = (sun_position.xy / resolution.xy) - vec2(0.5, 0.5);
|
||||
mouse.x *= resolution.x / resolution.y; //fix aspect ratio
|
||||
|
||||
vec4 previousColor = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||
|
||||
vec3 color = previousColor.rgb;
|
||||
|
||||
color += tint * lensflare(uv, mouse.xy, texResolution);
|
||||
color -= noise_vec2(FRAGCOORD.xy, texResolution)*.015;
|
||||
color = cc(color,.5,.1);
|
||||
COLOR = vec4(color,1.0);
|
||||
}
|
||||
1
flumi/Shaders/lensflare.gdshader.uid
Normal file
1
flumi/Shaders/lensflare.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c6auxoe0vpq46
|
||||
58
flumi/Shaders/pencil.gdshader
Normal file
58
flumi/Shaders/pencil.gdshader
Normal file
@@ -0,0 +1,58 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
uniform vec4 u_bgColor: source_color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
uniform float u_bgColorFactor: hint_range(0.0, 1.0) = 0.4;
|
||||
uniform vec4 u_patternColor: source_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
uniform float u_threshold1: hint_range(0.0, 1.0) = 0.75;
|
||||
uniform float u_threshold2: hint_range(0.0, 1.0) = 0.50;
|
||||
uniform float u_threshold3: hint_range(0.0, 1.0) = 0.25;
|
||||
uniform float u_threshold4: hint_range(0.0, 1.0) = 0.05;
|
||||
|
||||
uniform vec2 u_bgTiling = vec2(1.0, 1.0);
|
||||
uniform vec2 u_patternTiling = vec2(1.0, 1.0);
|
||||
|
||||
uniform sampler2D u_bgTexture;
|
||||
uniform sampler2D u_patternTexture;
|
||||
|
||||
const float C2_SQRT2 = 0.707106781;
|
||||
const mat2 ROT_45 = mat2(vec2(C2_SQRT2, -C2_SQRT2), vec2(C2_SQRT2, C2_SQRT2));
|
||||
const vec4 COLOR_WHITE = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
float getIntensity(vec3 color)
|
||||
{
|
||||
return 0.299*color.r + 0.587*color.g + 0.114*color.b;
|
||||
}
|
||||
|
||||
vec4 getPatternColor(vec2 uv, float intensity)
|
||||
{
|
||||
vec2 patternUV1 = vec2(-uv.x, uv.y) * u_patternTiling;
|
||||
vec2 patternUV2 = uv * u_patternTiling;
|
||||
vec2 patternUV3 = ROT_45*(uv + vec2(0.2358, 0.9123)) * u_patternTiling;
|
||||
vec2 patternUV4 = (vec2(uv.x, -uv.y) + vec2(0.4123, 0.7218)) * u_patternTiling;
|
||||
vec4 pCol1 = texture(u_patternTexture, patternUV1);
|
||||
vec4 pCol2 = texture(u_patternTexture, patternUV2);
|
||||
vec4 pCol3 = texture(u_patternTexture, patternUV3);
|
||||
vec4 pCol4 = texture(u_patternTexture, patternUV4);
|
||||
|
||||
if(intensity > u_threshold1)
|
||||
return vec4(1.0, 1.0, 1.0, 1.0);
|
||||
if(intensity > u_threshold2)
|
||||
return mix(pCol1, COLOR_WHITE, 0.5);
|
||||
if(intensity > u_threshold3)
|
||||
return mix(pCol1*pCol2, COLOR_WHITE, 0.3);
|
||||
if(intensity > u_threshold4)
|
||||
return mix(pCol1*pCol2*pCol3, COLOR_WHITE, 0.1);
|
||||
return pCol1*pCol2*pCol3*pCol4*0.8;
|
||||
}
|
||||
|
||||
void fragment()
|
||||
{
|
||||
vec4 origColor = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||
float intensity = getIntensity(origColor.rgb);
|
||||
vec4 bgColor = mix(texture(u_bgTexture, UV*u_bgTiling), u_bgColor, u_bgColorFactor);
|
||||
vec4 patternColor = getPatternColor(UV, intensity);
|
||||
vec4 color = mix(u_patternColor, bgColor, getIntensity(patternColor.rgb));
|
||||
COLOR = color;
|
||||
}
|
||||
1
flumi/Shaders/pencil.gdshader.uid
Normal file
1
flumi/Shaders/pencil.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c54knriu0lot8
|
||||
1
flumi/Shaders/pixelate.gdshader.uid
Normal file
1
flumi/Shaders/pixelate.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b4qebk1wtx6pj
|
||||
27
flumi/Shaders/rblur.gdshader
Normal file
27
flumi/Shaders/rblur.gdshader
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
放射状ブラーエフェクト by あるる(きのもと 結衣) @arlez80
|
||||
Radial Blur Effect by Yui Kinomoto
|
||||
|
||||
MIT License
|
||||
*/
|
||||
|
||||
shader_type canvas_item;
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
// 発射中央部
|
||||
uniform vec2 blur_center = vec2( 0.5, 0.5 );
|
||||
// ブラー強度
|
||||
uniform float blur_power : hint_range( 0.0, 1.0 ) = 0.01;
|
||||
// サンプリング回数
|
||||
uniform int sampling_count : hint_range( 1, 64 ) = 2;
|
||||
|
||||
void fragment( )
|
||||
{
|
||||
vec2 direction = SCREEN_UV - blur_center;
|
||||
vec3 c = vec3( 0.0, 0.0, 0.0 );
|
||||
float f = 1.0 / float( sampling_count );
|
||||
for( int i=0; i < sampling_count; i++ ) {
|
||||
c += texture( SCREEN_TEXTURE, SCREEN_UV - blur_power * direction * float(i) ).rgb * f;
|
||||
}
|
||||
COLOR.rgb = c;
|
||||
}
|
||||
1
flumi/Shaders/rblur.gdshader.uid
Normal file
1
flumi/Shaders/rblur.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bcwhtc0sjmwr3
|
||||
1
flumi/Shaders/retro.gdshader.uid
Normal file
1
flumi/Shaders/retro.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c366ik3prmltu
|
||||
59
flumi/Shaders/snowfall.gdshader
Normal file
59
flumi/Shaders/snowfall.gdshader
Normal file
@@ -0,0 +1,59 @@
|
||||
// Modified version of https://godotshaders.com/shader/multilayer-snowfall-shader/
|
||||
// All credits to the original author!!!
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float spread : hint_range(0.0, 1.5) = 0.5;
|
||||
uniform float size : hint_range(0.01, 5.0) = 0.5;
|
||||
uniform vec4 snow_color : source_color = vec4(1.0);
|
||||
uniform float snow_transparency: hint_range(-0.5, 1.0) = 0.2;
|
||||
|
||||
uniform float speed : hint_range(0.0, 10.0) = 0.5;
|
||||
uniform float wind : hint_range(-2.0, 2.0) = 0.0;
|
||||
uniform int num_of_layers = 40;
|
||||
|
||||
const mat3 NOISE_MATRIX = mat3(
|
||||
vec3(13.323122, 23.5112, 21.71123),
|
||||
vec3(21.1212, 28.7312, 11.9312),
|
||||
vec3(21.8112, 14.7212, 61.3934)
|
||||
);
|
||||
|
||||
vec3 generate_snowflake(vec2 coord, float layer_index, float time, float wind_strength) {
|
||||
float layer_scale = 1.0 + layer_index * 0.5 / (max(size, 0.01) * 2.0);
|
||||
vec2 scaled_coord = coord * layer_scale;
|
||||
|
||||
vec2 movement = vec2(
|
||||
scaled_coord.y * (spread * mod(layer_index * 7.238917, 1.0) - spread * 0.5) +
|
||||
(-wind_strength) * speed * time * 0.5,
|
||||
-speed * time / (1.0 + layer_index * 0.5 * 0.03)
|
||||
);
|
||||
vec2 final_coord = scaled_coord + movement;
|
||||
|
||||
vec3 noise_input = vec3(floor(final_coord), 31.189 + layer_index);
|
||||
vec3 noise_val = floor(noise_input) * 0.00001 + fract(noise_input);
|
||||
vec3 random = fract((31415.9 + noise_val) / fract(NOISE_MATRIX * noise_val));
|
||||
|
||||
vec2 shape = abs(mod(final_coord, 1.0) - 0.5 + 0.9 * random.xy - 0.45);
|
||||
shape += 0.01 * abs(2.0 * fract(10.0 * final_coord.yx) - 1.0);
|
||||
|
||||
float depth_offset = 5.0 * sin(time * 0.1);
|
||||
float edge_softness = 0.005 + 0.05 * min(0.5 * abs(layer_index - 5.0 - depth_offset), 1.0);
|
||||
|
||||
float shape_value = 0.6 * max(shape.x - shape.y, shape.x + shape.y) + max(shape.x, shape.y) - 0.01;
|
||||
|
||||
return vec3(smoothstep(edge_softness, -edge_softness, shape_value) *
|
||||
(random.x / (1.0 + 0.02 * layer_index * 0.5)));
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec3 snow_accumulation = vec3(0.0);
|
||||
|
||||
for (int i = 0; i < num_of_layers; i++) {
|
||||
snow_accumulation += generate_snowflake(UV, float(i), TIME, wind);
|
||||
}
|
||||
|
||||
float snow_intensity = clamp(length(snow_accumulation), 0.0, 1.0);
|
||||
vec4 transparency_color = vec4(snow_color.rgb * (1.0 + snow_transparency), snow_intensity);
|
||||
|
||||
COLOR = transparency_color;
|
||||
}
|
||||
1
flumi/Shaders/snowfall.gdshader.uid
Normal file
1
flumi/Shaders/snowfall.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://deof0r34dt78d
|
||||
17
flumi/Shaders/vignette.gdshader
Normal file
17
flumi/Shaders/vignette.gdshader
Normal file
@@ -0,0 +1,17 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float inner_radius = 0.1;
|
||||
uniform float outer_radius = 1;
|
||||
uniform float vignette_strength = 1.0;
|
||||
uniform float dither_strength = 0.03;
|
||||
uniform vec4 vignette_color: source_color;
|
||||
|
||||
|
||||
void fragment() {
|
||||
float dist = distance(UV, vec2(0.5));
|
||||
|
||||
float vignette = smoothstep(inner_radius, outer_radius, dist) * vignette_strength;
|
||||
float dither = fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453123) * dither_strength;
|
||||
|
||||
COLOR = vec4(vignette_color.rgb, vignette + dither);
|
||||
}
|
||||
1
flumi/Shaders/vignette.gdshader.uid
Normal file
1
flumi/Shaders/vignette.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://boba7hm3vito8
|
||||
1
flumi/Shaders/wobbly.gdshader.uid
Normal file
1
flumi/Shaders/wobbly.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://186q3n8sc7qw
|
||||
Reference in New Issue
Block a user