2023-04-17 04:18:26 +08:00
|
|
|
#version 120
|
2023-07-07 05:56:54 +08:00
|
|
|
//#extension GL_EXT_gpu_shader4 : disable
|
2023-04-17 04:18:26 +08:00
|
|
|
|
2023-07-07 20:56:38 +08:00
|
|
|
#include "/lib/settings.glsl"
|
2023-04-17 04:18:26 +08:00
|
|
|
uniform sampler2D colortex3;
|
|
|
|
// Compute 3x3 min max for TAA
|
|
|
|
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
/* DRAWBUFFERS:06 */
|
|
|
|
ivec2 center = ivec2(gl_FragCoord.xy);
|
|
|
|
vec3 current = texelFetch2D(colortex3, center, 0).rgb;
|
|
|
|
vec3 cMin = current;
|
|
|
|
vec3 cMax = current;
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(-1, -1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(-1, 0), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(-1, 1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(0, -1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(0, 1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(1, -1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(1, 0), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
current = texelFetch2D(colortex3, center + ivec2(1, 1), 0).rgb;
|
|
|
|
cMin = min(cMin, current);
|
|
|
|
cMax = max(cMax, current);
|
|
|
|
gl_FragData[0].rgb = cMax;
|
|
|
|
gl_FragData[1].rgb = cMin;
|
|
|
|
}
|