Fix resolve pass
This commit is contained in:
parent
d4680b5e1a
commit
82235ef194
|
@ -395,4 +395,6 @@ void main() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif // _Clusters
|
#endif // _Clusters
|
||||||
|
|
||||||
|
fragColor.a = 1.0; // Mark as opaque
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,15 +46,15 @@ vec3 textureBicubic(sampler2D tex, vec2 tc, vec2 texStep) {
|
||||||
return mix(mix(sample3, sample2, sx), mix(sample1, sample0, sx), sy);
|
return mix(mix(sample3, sample2, sx), mix(sample1, sample0, sx), sy);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 textureSS(sampler2D tex, vec2 tc, vec2 texStep) {
|
vec4 textureSS(sampler2D tex, vec2 tc, vec2 texStep) {
|
||||||
vec3 col = texture(tex, tc).rgb;
|
vec4 col = texture(tex, tc);
|
||||||
col += texture(tex, tc + vec2(1.5, 0.0) * texStep).rgb;
|
col += texture(tex, tc + vec2(1.5, 0.0) * texStep);
|
||||||
col += texture(tex, tc + vec2(-1.5, 0.0) * texStep).rgb;
|
col += texture(tex, tc + vec2(-1.5, 0.0) * texStep);
|
||||||
col += texture(tex, tc + vec2(0.0, 1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(0.0, 1.5) * texStep);
|
||||||
col += texture(tex, tc + vec2(0.0, -1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(0.0, -1.5) * texStep);
|
||||||
col += texture(tex, tc + vec2(1.5, 1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(1.5, 1.5) * texStep);
|
||||||
col += texture(tex, tc + vec2(-1.5, -1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(-1.5, -1.5) * texStep);
|
||||||
col += texture(tex, tc + vec2(1.5, -1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(1.5, -1.5) * texStep);
|
||||||
col += texture(tex, tc + vec2(-1.5, 1.5) * texStep).rgb;
|
col += texture(tex, tc + vec2(-1.5, 1.5) * texStep);
|
||||||
return col / 9.0;
|
return col / 9.0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,5 @@ out vec4 fragColor;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// 4X resolve
|
// 4X resolve
|
||||||
fragColor.rgb = textureSS(tex, texCoord, screenSizeInv / 4.0);
|
fragColor = textureSS(tex, texCoord, screenSizeInv / 4.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,4 +166,6 @@ void main() {
|
||||||
#ifdef _LDR
|
#ifdef _LDR
|
||||||
fragColor.rgb = pow(fragColor.rgb, vec3(1.0 / 2.2));
|
fragColor.rgb = pow(fragColor.rgb, vec3(1.0 / 2.2));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
fragColor.a = 0.0; // Mark as non-opaque
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue