summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2011-12-08 03:20:31 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2011-12-08 03:20:31 -0600
commitcecc3c3873c6aaabea514b3a5eff380e5a32856f (patch)
tree30b8de4c172ee25353e188e0e238d49d28ea67f8 /Source/Core/VideoCommon/Src/VertexShaderGen.cpp
parent1201988fe4e94720f32f2165ee03d5debf957cd7 (diff)
Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now.
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderGen.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
index 78feff6541..2aceb5cda7 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
@@ -195,9 +195,15 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n");
if (g_ActiveConfig.backend_info.bSupportsGLSLLocation)
WRITE(p, "#extension GL_ARB_separate_shader_objects : enable\n");
+ WRITE(p, "#define ATTRIN in\n");
+ WRITE(p, "#define ATTROUT out\n");
}
else
+ {
WRITE(p, "#version 120\n");
+ WRITE(p, "#define ATTRIN attribute\n");
+ WRITE(p, "#define ATTROUT attribute\n");
+ }
// Silly differences
WRITE(p, "#define float2 vec2\n");
WRITE(p, "#define float3 vec3\n");
@@ -227,11 +233,11 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
WRITE(p, " float3 rawnorm0 = gl_Normal; // NORMAL0,\n");
if (components & VB_HAS_POSMTXIDX)
- WRITE(p, "attribute float fposmtx; // ATTR%d,\n", SHADER_POSMTX_ATTRIB);
+ WRITE(p, "ATTRIN float fposmtx; // ATTR%d,\n", SHADER_POSMTX_ATTRIB);
if (components & VB_HAS_NRM1)
- WRITE(p, "attribute float3 rawnorm1; // ATTR%d,\n", SHADER_NORM1_ATTRIB);
+ WRITE(p, "ATTRIN float3 rawnorm1; // ATTR%d,\n", SHADER_NORM1_ATTRIB);
if (components & VB_HAS_NRM2)
- WRITE(p, "attribute float3 rawnorm2; // ATTR%d,\n", SHADER_NORM2_ATTRIB);
+ WRITE(p, "ATTRIN float3 rawnorm2; // ATTR%d,\n", SHADER_NORM2_ATTRIB);
if (components & VB_HAS_COL0)
WRITE(p, " float4 color0 = gl_Color; // COLOR0,\n");