millores en els presets

This commit is contained in:
2026-03-21 14:12:11 +01:00
parent 6996b3a82a
commit 23863c02a6
11 changed files with 125 additions and 48 deletions

View File

@@ -31,6 +31,9 @@ out vec4 FragColor;
// Uniforms
uniform sampler2D Texture;
uniform vec2 TextureSize;
uniform float uVignette; // 0 = sin viñeta, 1 = máxima
uniform float uScanlines; // 0 = desactivadas, 1 = plenas
uniform float uChroma; // 0 = sin aberración, 1 = máxima
#if defined(CURVATURE)
vec2 Distort(vec2 coord)
@@ -111,7 +114,11 @@ void main()
vec2 tc = vec2(texcoord.x, yCoord + dy);
#endif
vec3 colour = texture(Texture, tc).rgb;
float ca = uChroma * 0.005;
vec3 colour;
colour.r = texture(Texture, tc + vec2(ca, 0.0)).r;
colour.g = texture(Texture, tc).g;
colour.b = texture(Texture, tc - vec2(ca, 0.0)).b;
#if defined(SCANLINES)
#if defined(GAMMA)
@@ -122,7 +129,7 @@ void main()
#endif
#endif
scanLineWeight *= BLOOM_FACTOR;
colour *= scanLineWeight;
colour *= mix(1.0, scanLineWeight, uScanlines);
#if defined(GAMMA)
#if defined(FAKE_GAMMA)
@@ -133,6 +140,12 @@ void main()
#endif
#endif
if (uVignette > 0.0) {
vec2 uv = texcoord - vec2(0.5);
float vig = 1.0 - dot(uv, uv) * uVignette * 4.0;
colour *= clamp(vig, 0.0, 1.0);
}
#if MASK_TYPE == 0
FragColor = vec4(colour, 1.0);
#elif MASK_TYPE == 1

View File

@@ -34,6 +34,9 @@ out vec4 FragColor;
// Uniforms
uniform sampler2D Texture;
uniform vec2 TextureSize;
uniform float uVignette; // 0 = sin viñeta, 1 = máxima
uniform float uScanlines; // 0 = desactivadas, 1 = plenas
uniform float uChroma; // 0 = sin aberración, 1 = máxima
#if defined(CURVATURE)
vec2 Distort(vec2 coord)
@@ -114,7 +117,11 @@ void main()
vec2 tc = vec2(texcoord.x, yCoord + dy);
#endif
vec3 colour = texture(Texture, tc).rgb;
float ca = uChroma * 0.005;
vec3 colour;
colour.r = texture(Texture, tc + vec2(ca, 0.0)).r;
colour.g = texture(Texture, tc).g;
colour.b = texture(Texture, tc - vec2(ca, 0.0)).b;
#if defined(SCANLINES)
#if defined(GAMMA)
@@ -125,7 +132,7 @@ void main()
#endif
#endif
scanLineWeight *= BLOOM_FACTOR;
colour *= scanLineWeight;
colour *= mix(1.0, scanLineWeight, uScanlines);
#if defined(GAMMA)
#if defined(FAKE_GAMMA)
@@ -136,6 +143,12 @@ void main()
#endif
#endif
if (uVignette > 0.0) {
vec2 uv = texcoord - vec2(0.5);
float vig = 1.0 - dot(uv, uv) * uVignette * 4.0;
colour *= clamp(vig, 0.0, 1.0);
}
#if MASK_TYPE == 0
FragColor = vec4(colour, 1.0);
#elif MASK_TYPE == 1