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()
|
||||
{
|
||||
/* 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)
|
||||
g_state_texture_id[i] = 0;
|
||||
|
||||
|
|
|
@ -457,13 +457,12 @@ vec4 sample_4a(vec4 uv)
|
|||
{
|
||||
vec4 c;
|
||||
|
||||
// XXX
|
||||
// I think .a is related to 8bit texture in alpha channel
|
||||
// Opengl is only 8 bits on red channel. Not sure exactly of the impact
|
||||
c.x = sample_c(uv.xy).a;
|
||||
c.y = sample_c(uv.zy).a;
|
||||
c.z = sample_c(uv.xw).a;
|
||||
c.w = sample_c(uv.zw).a;
|
||||
// Dx used the alpha channel.
|
||||
// Opengl is only 8 bits on red channel.
|
||||
c.x = sample_c(uv.xy).r;
|
||||
c.y = sample_c(uv.zy).r;
|
||||
c.z = sample_c(uv.xw).r;
|
||||
c.w = sample_c(uv.zw).r;
|
||||
|
||||
return c * 255./256 + 0.5/256;
|
||||
}
|
||||
|
|
|
@ -485,13 +485,12 @@ static const char* tfx_glsl =
|
|||
"{\n"
|
||||
" vec4 c;\n"
|
||||
"\n"
|
||||
" // XXX\n"
|
||||
" // I think .a is related to 8bit texture in alpha channel\n"
|
||||
" // Opengl is only 8 bits on red channel. Not sure exactly of the impact\n"
|
||||
" c.x = sample_c(uv.xy).a;\n"
|
||||
" c.y = sample_c(uv.zy).a;\n"
|
||||
" c.z = sample_c(uv.xw).a;\n"
|
||||
" c.w = sample_c(uv.zw).a;\n"
|
||||
" // Dx used the alpha channel.\n"
|
||||
" // Opengl is only 8 bits on red channel.\n"
|
||||
" c.x = sample_c(uv.xy).r;\n"
|
||||
" c.y = sample_c(uv.zy).r;\n"
|
||||
" c.z = sample_c(uv.xw).r;\n"
|
||||
" c.w = sample_c(uv.zw).r;\n"
|
||||
"\n"
|
||||
" return c * 255./256 + 0.5/256;\n"
|
||||
"}\n"
|
||||
|
|
Loading…
Reference in New Issue