started on alternate GOG room
This commit is contained in:
26
Zennysoft.Game.Ma/src/map/map shaders/gog spectral.gdshader
Normal file
26
Zennysoft.Game.Ma/src/map/map shaders/gog spectral.gdshader
Normal file
@@ -0,0 +1,26 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded, depth_draw_always; // NO LIGHTING!, "depth_draw_always" to 'fix' Z-ordering
|
||||
|
||||
uniform bool warp_ScreenSpace = false;
|
||||
uniform sampler2D texture_albedo : source_color, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = vec2(0.0);
|
||||
|
||||
if(warp_ScreenSpace){
|
||||
uv = SCREEN_UV;
|
||||
}else{
|
||||
uv = UV;
|
||||
}
|
||||
|
||||
// TODO: ADD NOISE SAMPLER INSTEAD OF USING TRIG?
|
||||
|
||||
// TWEAK THE COEFFS AND/OR EQUATION FOR A DIFFERENT WARP PATTERN
|
||||
uv.x += sin(uv.y * 2.54 * PI + TIME) * cos(uv.y * 2.31 * PI + TIME) * 2.1;
|
||||
uv.y += cos(uv.x * 3.74 * PI + TIME) * -sin(uv.y * 3.64 * PI + TIME) * 1.1;
|
||||
|
||||
vec4 color = texture(texture_albedo, uv * 1.0);
|
||||
|
||||
ALBEDO = color.xyz;
|
||||
ALPHA = color.a;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://diblrwarabp25
|
||||
@@ -0,0 +1,33 @@
|
||||
shader_type spatial;
|
||||
|
||||
uniform vec4 hologram_color = vec4(0.0, 0.6, 1.0, 1.0);
|
||||
uniform float transparency : hint_range(0.0, 1.0) = 0.6;
|
||||
uniform float glitch_strength : hint_range(0.0, 1.0) = 0.3;
|
||||
uniform float glow_intensity : hint_range(0.0, 1.0) = 0.4;
|
||||
uniform float time_factor : hint_range(0.0, 10.0) = 1.0;
|
||||
uniform sampler2D texture_sampler;
|
||||
uniform float noise_amount : hint_range(0.0, 1.0) = 0.05;
|
||||
uniform float vertical_shift_speed : hint_range(-1.0, 1.0) = 0.1;
|
||||
|
||||
float random_noise(vec2 uv) {
|
||||
return fract(sin(dot(uv, vec2(12.9898, 78.233))) * 43758.5453);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = FRAGCOORD.xy / VIEWPORT_SIZE.xy;
|
||||
uv.y += TIME * vertical_shift_speed;
|
||||
float noise = random_noise(uv + TIME * 0.1);
|
||||
uv.x += noise * glitch_strength * 0.05;
|
||||
float glitch = sin(uv.x * 10.0 + TIME * time_factor) * glitch_strength;
|
||||
uv.x += glitch * 0.05;
|
||||
float glow = sin(TIME * 2.0) * glow_intensity;
|
||||
vec4 color = texture(texture_sampler, uv);
|
||||
color.rgb += glow * hologram_color.rgb * 0.5;
|
||||
color.r += sin(TIME + uv.y * 3.0) * 0.1 * glitch_strength;
|
||||
color.g += cos(TIME + uv.x * 2.0) * 0.1 * glitch_strength;
|
||||
color.rgb *= hologram_color.rgb;
|
||||
color.a *= transparency;
|
||||
color.rgb += random_noise(uv) * noise_amount;
|
||||
ALBEDO = color.rgb;
|
||||
ALPHA = color.a;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://c15ggsq72vcra
|
||||
Reference in New Issue
Block a user