first commit

This commit is contained in:
Ugric
2026-03-02 02:17:04 +00:00
commit 5d56860f3a
813 changed files with 41799 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
//SHADER ORIGINALY CREADED BY "demofox" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/XdXSzX
shader_type canvas_item;
uniform float contrast :hint_range(0.0, 3.0) = 1.0;
uniform float brightness :hint_range(-1.0, 1.0) = 0.0;
void fragment(){
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy;
vec3 pixelColor = texture(SCREEN_TEXTURE, uv).xyz;
// Grayscale
float pixelGrey = dot(pixelColor, vec3(0.2126, 0.7152, 0.0722));
pixelColor = vec3(pixelGrey);
// Contrast
pixelColor.rgb = ((pixelColor.rgb - 0.5) * max(contrast, 0.0)) + 0.5;
// Brightness
pixelColor.rgb += brightness;
COLOR = vec4(pixelColor, 1.0);
}

View File

@@ -0,0 +1,40 @@
//SHADER ORIGINALY CREADED BY "Wunkolo" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/tllfRf
shader_type canvas_item;
uniform vec4 Shadows :hint_color = vec4(0.0, 0.0, 0.0, 1.0);
uniform vec4 Midtones :hint_color = vec4(0.0, 0.0, 0.0, 1.0);
uniform vec4 Hilights :hint_color = vec4(0.0, 0.0, 0.0, 1.0);
vec3 InvLerp( vec3 A, vec3 B, vec3 t){
return (t - A) / (B - A);
}
vec3 ColorGrade( in vec3 InColor ){
// Calculate the three offseted colors up-front
vec3 OffShadows = InColor + Shadows.xyz;
vec3 OffMidtones = InColor + Midtones.xyz;
vec3 OffHilights = InColor + Hilights.xyz;
// Linearly interpolate between the 3 new colors, piece-wise
return mix(
// We pick which of the two control points to interpolate from based on which side of
// 0.5 the input color channel lands on
mix(OffShadows, OffMidtones, InvLerp(vec3(0.0), vec3(0.5), InColor)), // < 0.5
mix(OffMidtones, OffHilights, InvLerp(vec3(0.5), vec3(1.0), InColor)), // >= 0.5
greaterThanEqual(InColor, vec3(0.5))
);
}
void fragment(){
vec2 uv = FRAGCOORD.xy / vec2(1.0 / SCREEN_PIXEL_SIZE.xy);
COLOR.a = 1.0;
COLOR.rgb = texture(SCREEN_TEXTURE, uv).rgb;
COLOR.rgb = ColorGrade(COLOR.rgb);
//COLOR.rgb = pow(COLOR.rgb, vec3(2.2));
}

View File

@@ -0,0 +1,62 @@
//SHADER ORIGINALY CREADED BY "jcant0n" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/XssSDs#
shader_type canvas_item;
uniform float amount :hint_range(0.0, 1.5) = 1.0;
vec2 Circle(float Start, float Points, float Point) {
float Rad = (3.141592 * 3.0 * (1.0 / Points)) * (Point + Start);
return vec2(sin(Rad), cos(Rad));
}
void fragment(){
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy;
vec2 PixelOffset = amount / (1.0 / SCREEN_PIXEL_SIZE).xy;
float Start = 2.0 / 14.0;
vec2 Scale = 0.66 * 4.0 * 2.0 * PixelOffset.xy;
vec3 N0 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 0.0) * Scale).rgb;
vec3 N1 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 1.0) * Scale).rgb;
vec3 N2 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 2.0) * Scale).rgb;
vec3 N3 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 3.0) * Scale).rgb;
vec3 N4 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 4.0) * Scale).rgb;
vec3 N5 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 5.0) * Scale).rgb;
vec3 N6 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 6.0) * Scale).rgb;
vec3 N7 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 7.0) * Scale).rgb;
vec3 N8 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 8.0) * Scale).rgb;
vec3 N9 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 9.0) * Scale).rgb;
vec3 N10 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 10.0) * Scale).rgb;
vec3 N11 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 11.0) * Scale).rgb;
vec3 N12 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 12.0) * Scale).rgb;
vec3 N13 = texture(SCREEN_TEXTURE, uv + Circle(Start, 14.0, 13.0) * Scale).rgb;
vec3 N14 = texture(SCREEN_TEXTURE, uv).rgb;
float W = 1.0 / 15.0;
vec3 color = vec3(0,0,0);
color.rgb =
(N0 * W) +
(N1 * W) +
(N2 * W) +
(N3 * W) +
(N4 * W) +
(N5 * W) +
(N6 * W) +
(N7 * W) +
(N8 * W) +
(N9 * W) +
(N10 * W) +
(N11 * W) +
(N12 * W) +
(N13 * W) +
(N14 * W);
COLOR = vec4(color.rgb,1.0);
}

View File

@@ -0,0 +1,30 @@
//SHADER ORIGINALY CREADED BY "abelcamarena" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/tsKGDm
// Looking for ditheirng? I reccomend using this shader instead :
// https://github.com/WittyCognomen/godot-psx-shaders/blob/master/shaders/psx_dither_post.shader
// https://github.com/WittyCognomen/godot-psx-shaders/tree/master/shaders/dithers
shader_type canvas_item;
uniform float SCREEN_WIDTH = 320.; // Lower num - bigger pixels (this will be the screen width)
uniform float COLOR_FACTOR :hint_range(0., 10.) = 4.; // Higher num - higher colors quality
void fragment(){
// Reduce pixels
vec2 size = SCREEN_WIDTH * SCREEN_PIXEL_SIZE.xy/SCREEN_PIXEL_SIZE.x;
vec2 coor = floor( UV * size) ;
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy;
// Get source color
vec3 col = texture(SCREEN_TEXTURE, uv).xyz;
// Reduce colors
col = floor(col * COLOR_FACTOR) / COLOR_FACTOR;
// Output to screen
COLOR = vec4(col,1.);
}

View File

@@ -0,0 +1,44 @@
//SHADER ORIGINALY CREADED BY "abelcamarena" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/tsKGDm
shader_type canvas_item;
uniform float SCREEN_WIDTH = 320.; // Lower num - bigger pixels (this will be the screen width)
uniform float COLOR_FACTOR :hint_range(0., 10.) = 4.; // Higher num - higher colors quality
uniform float DITHERING_STRENTH :hint_range(0., .07) = 0.005; // Be carefull with this one, dithering can get messy really easily
int PSXDither(ivec2 fragcoord) {
const int dither_table[16] = {
-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 dither_table[y * 4 + x];
}
void fragment(){
// Reduce pixels
vec2 size = SCREEN_WIDTH * SCREEN_PIXEL_SIZE.xy/SCREEN_PIXEL_SIZE.x;
vec2 coor = floor( UV * size) ;
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy;
// Get source color
vec3 col = texture(SCREEN_TEXTURE, uv).xyz;
// Dithering
col += float(PSXDither(ivec2(FRAGCOORD.xy))) * DITHERING_STRENTH;
// Reduce colors
col = floor(col * COLOR_FACTOR) / COLOR_FACTOR;
// Output to screen
COLOR = vec4(col,1.);
}

View File

@@ -0,0 +1,27 @@
//SHADER ORIGINALY CREADED BY "Nihilistic_Furry" FROM SHADERTOY
//MODIFIED AND PORTED TO GODOT BY AHOPNESS (@ahopness)
//LICENSE : CC0
//COMATIBLE WITH : GLES2, GLES3, WEBGL
//SHADERTOY LINK : https://www.shadertoy.com/view/wsK3Wt
shader_type canvas_item;
uniform float sharpen_amount :hint_range(0,4) = 1.0;
vec4 sharpenMask (sampler2D st, vec2 fc, vec2 sps){
// Sharpen detection matrix [0,1,0],[1,-4,1],[0,1,0]
// Colors
vec4 up = texture (st, (fc + vec2 (0, 1))/sps);
vec4 left = texture (st, (fc + vec2 (-1, 0))/sps);
vec4 center = texture (st, fc/sps);
vec4 right = texture (st, (fc + vec2 (1, 0))/sps);
vec4 down = texture (st, (fc + vec2 (0, -1))/sps);
// Return edge detection
return (1.0 + 4.0*sharpen_amount)*center -sharpen_amount*(up + left + right + down);
}
void fragment(){
// Detect edges and output to screen
COLOR = sharpenMask (SCREEN_TEXTURE, FRAGCOORD.xy, 1.0 / SCREEN_PIXEL_SIZE);
}