mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: remove old ati hack for point sampler
Was never used on openGL In the future absolute coordinate will be use anyway
This commit is contained in:
parent
ed21d88735
commit
6b84a89b6a
|
@ -291,7 +291,6 @@ class GSDeviceOGL : public GSDevice
|
|||
|
||||
// Hack
|
||||
uint32 tcoffsethack:1;
|
||||
//uint32 point_sampler:1; Not tested, so keep the bit for blend
|
||||
|
||||
uint32 _free2:19;
|
||||
};
|
||||
|
|
|
@ -820,9 +820,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
|
||||
ps_sel.ltf = bilinear && !simple_sample;
|
||||
spritehack = tex->m_spritehack_t;
|
||||
// FIXME the ati is currently disabled on the shader. I need to find a .gs to test that we got same
|
||||
// bug on opengl
|
||||
//ps_sel.point_sampler = 0; // !(bilinear && simple_sample);
|
||||
|
||||
int w = tex->m_texture->GetWidth();
|
||||
int h = tex->m_texture->GetHeight();
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
#define PS_TCC 1
|
||||
#endif
|
||||
|
||||
// Not sure we have same issue on opengl. Doesn't work anyway on ATI card
|
||||
// And I say this as an ATI user.
|
||||
#define ATI_SUCKS 0
|
||||
|
||||
#define SW_BLEND (PS_BLEND_A || PS_BLEND_B || PS_BLEND_D)
|
||||
|
||||
#ifdef FRAGMENT_SHADER
|
||||
|
@ -81,16 +77,6 @@ layout(std140, binding = 21) uniform cb21
|
|||
|
||||
vec4 sample_c(vec2 uv)
|
||||
{
|
||||
// FIXME: check the issue on openGL
|
||||
#if (ATI_SUCKS == 1) && (PS_POINT_SAMPLER == 1)
|
||||
// Weird issue with ATI cards (happens on at least HD 4xxx and 5xxx),
|
||||
// it looks like they add 127/128 of a texel to sampling coordinates
|
||||
// occasionally causing point sampling to erroneously round up.
|
||||
// I'm manually adjusting coordinates to the centre of texels here,
|
||||
// though the centre is just paranoia, the top left corner works fine.
|
||||
uv = (trunc(uv * WH.zw) + vec2(0.5, 0.5)) / WH.zw;
|
||||
#endif
|
||||
|
||||
return texture(TextureSampler, uv);
|
||||
}
|
||||
|
||||
|
|
|
@ -879,10 +879,6 @@ static const char* tfx_fs_all_glsl =
|
|||
"#define PS_TCC 1\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"// Not sure we have same issue on opengl. Doesn't work anyway on ATI card\n"
|
||||
"// And I say this as an ATI user.\n"
|
||||
"#define ATI_SUCKS 0\n"
|
||||
"\n"
|
||||
"#define SW_BLEND (PS_BLEND_A || PS_BLEND_B || PS_BLEND_D)\n"
|
||||
"\n"
|
||||
"#ifdef FRAGMENT_SHADER\n"
|
||||
|
@ -940,16 +936,6 @@ static const char* tfx_fs_all_glsl =
|
|||
"\n"
|
||||
"vec4 sample_c(vec2 uv)\n"
|
||||
"{\n"
|
||||
" // FIXME: check the issue on openGL\n"
|
||||
"#if (ATI_SUCKS == 1) && (PS_POINT_SAMPLER == 1)\n"
|
||||
" // Weird issue with ATI cards (happens on at least HD 4xxx and 5xxx),\n"
|
||||
" // it looks like they add 127/128 of a texel to sampling coordinates\n"
|
||||
" // occasionally causing point sampling to erroneously round up.\n"
|
||||
" // I'm manually adjusting coordinates to the centre of texels here,\n"
|
||||
" // though the centre is just paranoia, the top left corner works fine.\n"
|
||||
" uv = (trunc(uv * WH.zw) + vec2(0.5, 0.5)) / WH.zw;\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
" return texture(TextureSampler, uv);\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
|
|
Loading…
Reference in New Issue