vertex shader for texture converter

This commit is contained in:
degasus
2013-01-11 11:59:42 +01:00
parent 092a99cbd2
commit 60b8e4fb1c
6 changed files with 99 additions and 87 deletions

View File

@ -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;

View File

@ -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