Cleanup chromatic aberration shader
This commit is contained in:
parent
3f51b35b89
commit
4cef68c818
|
@ -45,9 +45,10 @@ void main() {
|
|||
int num_iter = compoChromaticSamples;
|
||||
#endif
|
||||
|
||||
float reci_num_iter_f = 1.0 / float(num_iter);
|
||||
|
||||
// Spectral
|
||||
if (compoChromaticType == 1) {
|
||||
float reci_num_iter_f = 1.0 / float(num_iter);
|
||||
|
||||
vec2 resolution = vec2(1,1);
|
||||
vec2 uv = (texCoord.xy/resolution.xy);
|
||||
vec4 sumcol = vec4(0.0);
|
||||
|
@ -61,15 +62,14 @@ void main() {
|
|||
}
|
||||
|
||||
fragColor = sumcol / sumw;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// Simple
|
||||
else {
|
||||
vec3 col = vec3(0.0);
|
||||
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.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);
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue