mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl-wnd: fix ifdef mess on fxaa (both dx and ogl)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5665 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
adc232cb95
commit
4c37d25134
|
@ -323,7 +323,7 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
|
|||
if (!GLLoader::found_only_gl30) {
|
||||
// This extension become core on openGL4
|
||||
fxaa_macro += "#extension GL_ARB_gpu_shader5 : enable\n";
|
||||
fxaa_macro += "#define FXAA_GATHER4_ALPHA\n";
|
||||
fxaa_macro += "#define FXAA_GATHER4_ALPHA 1\n";
|
||||
}
|
||||
m_fxaa.cb = new GSUniformBufferOGL(g_fxaa_cb_index, sizeof(FXAAConstantBuffer));
|
||||
CompileShaderFromSource("fxaa.fx", "ps_main", GL_FRAGMENT_SHADER, &m_fxaa.ps, fxaa_fx, fxaa_macro);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#if defined(SHADER_MODEL) || defined(FXAA_GLSL_130) // make safe to include in resource file to enforce dependency
|
||||
|
||||
#ifndef FXAA_GLSL_130
|
||||
#define FXAA_GLSL_130 0
|
||||
#endif
|
||||
|
||||
#define FXAA_PC 1
|
||||
#define FXAA_QUALITY_SUBPIX 0.0
|
||||
|
||||
|
@ -60,7 +64,7 @@ struct PS_OUTPUT
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef FXAA_GLSL_130
|
||||
#if (FXAA_GLSL_130 == 1)
|
||||
struct vertex_basic
|
||||
{
|
||||
vec4 p;
|
||||
|
@ -1224,7 +1228,7 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef FXAA_GLSL_130
|
||||
#if (FXAA_GLSL_130 == 1)
|
||||
void ps_main()
|
||||
{
|
||||
vec2 pos = PSin_t;
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
static const char* fxaa_fx =
|
||||
"#if defined(SHADER_MODEL) || defined(FXAA_GLSL_130) // make safe to include in resource file to enforce dependency\n"
|
||||
"\n"
|
||||
"#ifndef FXAA_GLSL_130\n"
|
||||
" #define FXAA_GLSL_130 0\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"#define FXAA_PC 1\n"
|
||||
"#define FXAA_QUALITY_SUBPIX 0.0\n"
|
||||
"\n"
|
||||
|
@ -88,7 +92,7 @@ static const char* fxaa_fx =
|
|||
"#endif\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"#ifdef FXAA_GLSL_130\n"
|
||||
"#if (FXAA_GLSL_130 == 1)\n"
|
||||
"struct vertex_basic\n"
|
||||
"{\n"
|
||||
" vec4 p;\n"
|
||||
|
@ -1252,7 +1256,7 @@ static const char* fxaa_fx =
|
|||
"}\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
"#ifdef FXAA_GLSL_130\n"
|
||||
"#if (FXAA_GLSL_130 == 1)\n"
|
||||
"void ps_main()\n"
|
||||
"{\n"
|
||||
" vec2 pos = PSin_t;\n"
|
||||
|
|
Loading…
Reference in New Issue