mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-10-08 00:03:36 +00:00
SW backend: make shaders work on Intel/Windows.
Apparently the Intel shader compiler doesn't implement "#if" correctly... so use "#ifdef" instead.
This commit is contained in:
parent
47d96e449a
commit
bdcd5ba39b
@ -39,7 +39,7 @@ namespace HwRasterizer
|
|||||||
{
|
{
|
||||||
// Color Vertices
|
// Color Vertices
|
||||||
static const char *fragcolText =
|
static const char *fragcolText =
|
||||||
"#if GL_ES\n"
|
"#ifdef GL_ES\n"
|
||||||
"precision highp float;\n"
|
"precision highp float;\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"varying vec4 TexCoordOut;\n"
|
"varying vec4 TexCoordOut;\n"
|
||||||
@ -48,7 +48,7 @@ namespace HwRasterizer
|
|||||||
"}\n";
|
"}\n";
|
||||||
// Texture Vertices
|
// Texture Vertices
|
||||||
static const char *fragtexText =
|
static const char *fragtexText =
|
||||||
"#if GL_ES\n"
|
"#ifdef GL_ES\n"
|
||||||
"precision highp float;\n"
|
"precision highp float;\n"
|
||||||
"#define texture2DRect texture2D\n"
|
"#define texture2DRect texture2D\n"
|
||||||
"#define sampler2DRect sampler2D\n"
|
"#define sampler2DRect sampler2D\n"
|
||||||
@ -60,7 +60,7 @@ namespace HwRasterizer
|
|||||||
"}\n";
|
"}\n";
|
||||||
// Clear shader
|
// Clear shader
|
||||||
static const char *fragclearText =
|
static const char *fragclearText =
|
||||||
"#if GL_ES\n"
|
"#ifdef GL_ES\n"
|
||||||
"precision highp float;\n"
|
"precision highp float;\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"uniform vec4 Color;\n"
|
"uniform vec4 Color;\n"
|
||||||
|
@ -51,7 +51,7 @@ void SWRenderer::Shutdown()
|
|||||||
void CreateShaders()
|
void CreateShaders()
|
||||||
{
|
{
|
||||||
static const char *fragShaderText =
|
static const char *fragShaderText =
|
||||||
"#if GL_ES\n"
|
"#ifdef GL_ES\n"
|
||||||
"precision highp float;\n"
|
"precision highp float;\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"varying vec2 TexCoordOut;\n"
|
"varying vec2 TexCoordOut;\n"
|
||||||
@ -60,7 +60,7 @@ void CreateShaders()
|
|||||||
" gl_FragColor = texture2D(Texture, TexCoordOut);\n"
|
" gl_FragColor = texture2D(Texture, TexCoordOut);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
static const char *vertShaderText =
|
static const char *vertShaderText =
|
||||||
"#if GL_ES\n"
|
"#ifdef GL_ES\n"
|
||||||
"precision highp float;\n"
|
"precision highp float;\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"attribute vec4 pos;\n"
|
"attribute vec4 pos;\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user