glsl: fog is a single byte

Give a chance to the driver to optimize if possible
This commit is contained in:
Gregory Hainaut 2015-04-24 21:37:37 +02:00
parent c207632e49
commit 36514bd95f
3 changed files with 5 additions and 11 deletions

View File

@ -206,9 +206,7 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
{2 , GL_UNSIGNED_SHORT , GL_FALSE , sizeof(GSVertex) , (const GLvoid*)(16) } ,
{1 , GL_UNSIGNED_INT , GL_FALSE , sizeof(GSVertex) , (const GLvoid*)(20) } ,
{2 , GL_UNSIGNED_SHORT , GL_FALSE , sizeof(GSVertex) , (const GLvoid*)(24) } ,
// FIXME only first byte is useful
{4 , GL_UNSIGNED_BYTE , GL_TRUE , sizeof(GSVertex) , (const GLvoid*)(28) } ,
// TEST ME {1 , GL_UNSIGNED_BYTE , GL_TRUE , sizeof(GSVertex) , (const GLvoid*)(28) } ,
{1 , GL_UNSIGNED_BYTE , GL_TRUE , sizeof(GSVertex) , (const GLvoid*)(28) } ,
};
m_va = new GSVertexBufferStateOGL(sizeof(GSVertexPT1), il_convert, countof(il_convert));

View File

@ -14,9 +14,7 @@ layout(location = 3) in float i_q;
layout(location = 4) in uvec2 i_p;
layout(location = 5) in uint i_z;
layout(location = 6) in uvec2 i_uv;
// FIXME only first byte is useful
//TEST_ME layout(location = 7) in float i_f;
layout(location = 7) in vec4 i_f;
layout(location = 7) in float i_f;
out SHADER
{
@ -147,7 +145,7 @@ void vs_main()
VSout_c = i_c;
VSout_fc = i_c;
VSout_t.z = i_f.r;
VSout_t.z = i_f;
}
#endif

View File

@ -465,9 +465,7 @@ static const char* tfx_vgs_glsl =
"layout(location = 4) in uvec2 i_p;\n"
"layout(location = 5) in uint i_z;\n"
"layout(location = 6) in uvec2 i_uv;\n"
"// FIXME only first byte is useful\n"
"//TEST_ME layout(location = 7) in float i_f;\n"
"layout(location = 7) in vec4 i_f;\n"
"layout(location = 7) in float i_f;\n"
"\n"
"out SHADER\n"
"{\n"
@ -598,7 +596,7 @@ static const char* tfx_vgs_glsl =
"\n"
" VSout_c = i_c;\n"
" VSout_fc = i_c;\n"
" VSout_t.z = i_f.r;\n"
" VSout_t.z = i_f;\n"
"}\n"
"\n"
"#endif\n"