t3du - CA Updates

This commit is contained in:
2025-06-02 17:00:57 +00:00
parent eede86e278
commit 32df55d636

View File

@ -5,7 +5,7 @@
uniform sampler2D tex; uniform sampler2D tex;
#ifdef _CPostprocess #ifdef _CPostprocess
uniform vec3 PPComp13; uniform vec4 PPComp13;
#endif #endif
in vec2 texCoord; in vec2 texCoord;
@ -43,13 +43,17 @@ void main() {
#ifdef _CPostprocess #ifdef _CPostprocess
float max_distort = PPComp13.x; float max_distort = PPComp13.x;
int num_iter = int(PPComp13.y); int num_iter = int(PPComp13.y);
int CAType = int(PPComp13.z);
int on = int(PPComp13.w);
#else #else
float max_distort = compoChromaticStrength; float max_distort = compoChromaticStrength;
int num_iter = compoChromaticSamples; int num_iter = compoChromaticSamples;
int CAType = compoChromaticType;
int on = 1;
#endif #endif
// Spectral // Spectral
if (compoChromaticType == 1) { if (CAType == 1) {
float reci_num_iter_f = 1.0 / float(num_iter); float reci_num_iter_f = 1.0 / float(num_iter);
vec2 resolution = vec2(1,1); vec2 resolution = vec2(1,1);
@ -64,7 +68,7 @@ void main() {
sumcol += w * texture(tex, barrelDistortion(uv, 0.6 * max_distort * t)); sumcol += w * texture(tex, barrelDistortion(uv, 0.6 * max_distort * t));
} }
fragColor = sumcol / sumw; if (on == 1) fragColor = sumcol / sumw; else fragColor = texture(tex, texCoord);
} }
// Simple // Simple
@ -73,6 +77,7 @@ void main() {
col.x = texture(tex, texCoord + ((vec2(0.0, 1.0) * max_distort) / vec2(1000.0))).x; col.x = texture(tex, texCoord + ((vec2(0.0, 1.0) * max_distort) / vec2(1000.0))).x;
col.y = texture(tex, texCoord + ((vec2(-0.85, -0.5) * max_distort) / vec2(1000.0))).y; col.y = texture(tex, texCoord + ((vec2(-0.85, -0.5) * max_distort) / vec2(1000.0))).y;
col.z = texture(tex, texCoord + ((vec2(0.85, -0.5) * max_distort) / vec2(1000.0))).z; col.z = texture(tex, texCoord + ((vec2(0.85, -0.5) * max_distort) / vec2(1000.0))).z;
fragColor = vec4(col.x, col.y, col.z, fragColor.w); if (on == 1) fragColor = vec4(col.x, col.y, col.z, fragColor.w);
else fragColor = texture(tex, texCoord);
} }
} }