diff options
| author | degasus <wickmarkus@web.de> | 2013-01-11 11:59:42 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2013-01-11 11:59:42 +0100 |
| commit | 60b8e4fb1cd39cb1612b25fd720f8521f0ceff79 (patch) | |
| tree | 27f3b922ff117590c463f7e1fe749670a10e741b /Source/Core/VideoCommon | |
| parent | 092a99cbd25e90811140b21331a3f10d3807a6a1 (diff) | |
vertex shader for texture converter
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureConversionShader.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexShaderGen.h | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index 87c2f51329..7ef96db26f 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -120,8 +120,8 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType) if (ApiType == API_OPENGL) { - WRITE(p, " float4 ocol0;\n"); - WRITE(p, " float2 uv0 = gl_TexCoord[0].xy;\n"); + WRITE(p, " out float4 ocol0;\n"); + WRITE(p, " in float2 uv0;\n"); WRITE(p, "void main()\n"); } else @@ -204,8 +204,8 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType) if (ApiType == API_OPENGL) { - WRITE(p, " float4 ocol0;\n"); - WRITE(p, " float2 uv0 = gl_TexCoord[0].xy;\n"); + WRITE(p, " out float4 ocol0;\n"); + WRITE(p, " in float2 uv0;\n"); WRITE(p, "void main()\n"); } else @@ -315,8 +315,6 @@ void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* dest) void WriteEncoderEnd(char* p, API_TYPE ApiType) { - if (ApiType == API_OPENGL) - WRITE(p, "gl_FragData[0] = ocol0;\n"); WRITE(p, "}\n"); IntensityConstantAdded = false; s_incrementSampleXCount = 0; diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.h b/Source/Core/VideoCommon/Src/VertexShaderGen.h index d41ba2141a..335b54d786 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.h +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.h @@ -21,9 +21,13 @@ #include "XFMemory.h" #include "VideoCommon.h" -#define SHADER_POSMTX_ATTRIB 1 -#define SHADER_NORM1_ATTRIB 6 -#define SHADER_NORM2_ATTRIB 7 +// TODO should be reordered +#define SHADER_POSMTX_ATTRIB 1 +#define SHADER_POSITION_ATTRIB 2 +#define SHADER_TEXTURE0_ATTRIB 3 +#define SHADER_COLOR0_ATTRIB 4 +#define SHADER_NORM1_ATTRIB 6 +#define SHADER_NORM2_ATTRIB 7 // shader variables |
