mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 04:32:35 +01:00
glsl: use fragCoord to decide interlacing
This commit is contained in:
parent
4e8130bd99
commit
ac9afbfede
@ -158,7 +158,7 @@ namespace glsl
|
||||
;
|
||||
}
|
||||
|
||||
void insert_rop(std::ostream& OS, const shader_properties& props)
|
||||
void insert_rop(std::ostream& OS, const shader_properties& /*props*/)
|
||||
{
|
||||
OS <<
|
||||
#include "GLSLSnippets//RSXProg/RSXROPEpilogue.glsl"
|
||||
|
@ -99,7 +99,7 @@ vec4 read_source()
|
||||
? texture(fs0, tc0 * ou_single_matrix)
|
||||
: texture(fs0, (tc0 * ou_single_matrix) + vec2(0.f, 0.020408f));
|
||||
case STEREO_MODE_INTERLACED:
|
||||
return (mod(textureSize(fs0, 0).y * tc0.y, 2.f) < 1.f)
|
||||
return ((int(gl_FragCoord.y) & 1) > 0)
|
||||
? texture(fs0, tc0 * left_single_matrix)
|
||||
: texture(fs0, (tc0 * left_single_matrix) + right_single_matrix);
|
||||
default: // undefined behavior
|
||||
@ -126,7 +126,7 @@ vec4 read_source()
|
||||
? texture(fs0, (tc0 * ou_multi_matrix))
|
||||
: texture(fs1, (tc0 * ou_multi_matrix) + vec2(0.f, -1.f));
|
||||
case STEREO_MODE_INTERLACED:
|
||||
return (mod(textureSize(fs0, 0).y * tc0.y, 2.f) < 1.f)
|
||||
return ((int(gl_FragCoord.y) & 1) > 0)
|
||||
? texture(fs0, tc0)
|
||||
: texture(fs1, tc0);
|
||||
default: // undefined behavior
|
||||
|
Loading…
Reference in New Issue
Block a user