gsdx-ogl: fix texture palette mask

This commit is contained in:
Gregory Hainaut 2015-07-17 19:59:32 +02:00
parent b4c04ed00a
commit ea9e608288
3 changed files with 8 additions and 8 deletions

View File

@ -185,7 +185,7 @@ uvec4 sample_4_index(vec4 uv)
return i >> 4u; return i >> 4u;
#elif PS_IFMT == 2 #elif PS_IFMT == 2
// 4HL // 4HL
return i & 16u; return i & 0xFu;
#else #else
// 8 bits // 8 bits
return i; return i;

View File

@ -21,7 +21,7 @@ out SHADER
{ {
vec4 t; vec4 t;
vec4 c; vec4 c;
flat vec4 fc; flat vec4 fc;
} VSout; } VSout;
#define VSout_t (VSout.t) #define VSout_t (VSout.t)
@ -106,7 +106,7 @@ void vs_main()
texture_coord(); texture_coord();
VSout_c = i_c; VSout_c = i_c;
VSout_fc = i_c; VSout_fc = i_c;
VSout_t.z = i_f.x; VSout_t.z = i_f.x;
} }
@ -212,7 +212,7 @@ void gs_main()
lt.c = rb.c; lt.c = rb.c;
#endif #endif
// Swap texture and position coordinate // Swap texture and position coordinate
vertex lb = rb; vertex lb = rb;
lb.t.x = lt.t.x; lb.t.x = lt.t.x;
lb_p.x = lt_p.x; lb_p.x = lt_p.x;

View File

@ -629,7 +629,7 @@ static const char* tfx_vgs_glsl =
"{\n" "{\n"
" vec4 t;\n" " vec4 t;\n"
" vec4 c;\n" " vec4 c;\n"
" flat vec4 fc;\n" " flat vec4 fc;\n"
"} VSout;\n" "} VSout;\n"
"\n" "\n"
"#define VSout_t (VSout.t)\n" "#define VSout_t (VSout.t)\n"
@ -714,7 +714,7 @@ static const char* tfx_vgs_glsl =
" texture_coord();\n" " texture_coord();\n"
"\n" "\n"
" VSout_c = i_c;\n" " VSout_c = i_c;\n"
" VSout_fc = i_c;\n" " VSout_fc = i_c;\n"
" VSout_t.z = i_f.x;\n" " VSout_t.z = i_f.x;\n"
"}\n" "}\n"
"\n" "\n"
@ -820,7 +820,7 @@ static const char* tfx_vgs_glsl =
" lt.c = rb.c;\n" " lt.c = rb.c;\n"
"#endif\n" "#endif\n"
"\n" "\n"
" // Swap texture and position coordinate\n" " // Swap texture and position coordinate\n"
" vertex lb = rb;\n" " vertex lb = rb;\n"
" lb.t.x = lt.t.x;\n" " lb.t.x = lt.t.x;\n"
" lb_p.x = lt_p.x;\n" " lb_p.x = lt_p.x;\n"
@ -1046,7 +1046,7 @@ static const char* tfx_fs_all_glsl =
" return i >> 4u;\n" " return i >> 4u;\n"
"#elif PS_IFMT == 2\n" "#elif PS_IFMT == 2\n"
" // 4HL\n" " // 4HL\n"
" return i & 16u;\n" " return i & 0xFu;\n"
"#else\n" "#else\n"
" // 8 bits\n" " // 8 bits\n"
" return i;\n" " return i;\n"