mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl-wnd:
* Patch from miseru to fix VS2010 * Quick fix for 8-bits textures git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5658 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e021630bb9
commit
92a3549e9c
|
@ -138,7 +138,7 @@ GSTextureOGL::GSTextureOGL(int type, int w, int h, bool msaa, int format, GLuint
|
||||||
GSTextureOGL::~GSTextureOGL()
|
GSTextureOGL::~GSTextureOGL()
|
||||||
{
|
{
|
||||||
/* Unbind the texture from our local state */
|
/* Unbind the texture from our local state */
|
||||||
for (uint i = 0; i < 7; i++)
|
for (uint32 i = 0; i < 7; i++)
|
||||||
if (g_state_texture_id[i] == m_texture_id)
|
if (g_state_texture_id[i] == m_texture_id)
|
||||||
g_state_texture_id[i] = 0;
|
g_state_texture_id[i] = 0;
|
||||||
|
|
||||||
|
|
|
@ -457,13 +457,12 @@ vec4 sample_4a(vec4 uv)
|
||||||
{
|
{
|
||||||
vec4 c;
|
vec4 c;
|
||||||
|
|
||||||
// XXX
|
// Dx used the alpha channel.
|
||||||
// I think .a is related to 8bit texture in alpha channel
|
// Opengl is only 8 bits on red channel.
|
||||||
// Opengl is only 8 bits on red channel. Not sure exactly of the impact
|
c.x = sample_c(uv.xy).r;
|
||||||
c.x = sample_c(uv.xy).a;
|
c.y = sample_c(uv.zy).r;
|
||||||
c.y = sample_c(uv.zy).a;
|
c.z = sample_c(uv.xw).r;
|
||||||
c.z = sample_c(uv.xw).a;
|
c.w = sample_c(uv.zw).r;
|
||||||
c.w = sample_c(uv.zw).a;
|
|
||||||
|
|
||||||
return c * 255./256 + 0.5/256;
|
return c * 255./256 + 0.5/256;
|
||||||
}
|
}
|
||||||
|
|
|
@ -485,13 +485,12 @@ static const char* tfx_glsl =
|
||||||
"{\n"
|
"{\n"
|
||||||
" vec4 c;\n"
|
" vec4 c;\n"
|
||||||
"\n"
|
"\n"
|
||||||
" // XXX\n"
|
" // Dx used the alpha channel.\n"
|
||||||
" // I think .a is related to 8bit texture in alpha channel\n"
|
" // Opengl is only 8 bits on red channel.\n"
|
||||||
" // Opengl is only 8 bits on red channel. Not sure exactly of the impact\n"
|
" c.x = sample_c(uv.xy).r;\n"
|
||||||
" c.x = sample_c(uv.xy).a;\n"
|
" c.y = sample_c(uv.zy).r;\n"
|
||||||
" c.y = sample_c(uv.zy).a;\n"
|
" c.z = sample_c(uv.xw).r;\n"
|
||||||
" c.z = sample_c(uv.xw).a;\n"
|
" c.w = sample_c(uv.zw).r;\n"
|
||||||
" c.w = sample_c(uv.zw).a;\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" return c * 255./256 + 0.5/256;\n"
|
" return c * 255./256 + 0.5/256;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
|
Loading…
Reference in New Issue