gsdx shader: add a shader to render text for OSD

Gregory: code extracted from the OSD PR to reduce conflict
This commit is contained in:
Jason Brown 2016-10-09 14:17:54 +02:00 committed by Gregory Hainaut
parent d84d30fe87
commit 6ef5607d99
4 changed files with 18 additions and 2 deletions

View File

@ -44,7 +44,9 @@ enum ShaderConvert {
ShaderConvert_RGBA8_TO_FLOAT24,
ShaderConvert_RGBA8_TO_FLOAT16,
ShaderConvert_RGB5A1_TO_FLOAT16,
ShaderConvert_RGBA_TO_8I = 17
ShaderConvert_RGBA_TO_8I = 17,
ShaderConvert_OSD,
ShaderConvert_Count
};
#pragma pack(push, 1)

View File

@ -429,7 +429,7 @@ public:
struct {
GLuint vs; // program object
GLuint ps[18]; // program object
GLuint ps[ShaderConvert_Count]; // program object
GLuint ln; // sampler object
GLuint pt; // sampler object
GSDepthStencilOGL* dss;

View File

@ -278,6 +278,13 @@ void ps_main17()
}
#endif
#ifdef ps_main18
void ps_main18()
{
SV_Target0 = PSin.c * vec4(1.0, 1.0, 1.0, sample_c().r);
}
#endif
#ifdef ps_main7
void ps_main7()
{

View File

@ -413,6 +413,13 @@ static const char* const convert_glsl =
"}\n"
"#endif\n"
"\n"
"#ifdef ps_main18\n"
"void ps_main18()\n"
"{\n"
" SV_Target0 = PSin.c * vec4(1.0, 1.0, 1.0, sample_c().r);\n"
"}\n"
"#endif\n"
"\n"
"#ifdef ps_main7\n"
"void ps_main7()\n"
"{\n"