From 6d57bbbfcbd9e1c79f336cb5752d4637badc8293 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 20 May 2018 21:59:47 +0200 Subject: [PATCH] remove unused stuff --- inc/paletteshader.h | 20 +++++++------------- src/render.c | 4 ---- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/inc/paletteshader.h b/inc/paletteshader.h index 47076c5..5c9167b 100644 --- a/inc/paletteshader.h +++ b/inc/paletteshader.h @@ -18,9 +18,9 @@ const GLchar *PaletteFragShader110Src = "\n" "void main()\n" "{\n" - " vec4 index = texture2D(SurfaceTex, TexCoord0); \n" - " vec4 texel = texture2D(PaletteTex, index.xy); \n" - " gl_FragColor = texel;\n" + " vec4 paletteIndex = texture2D(SurfaceTex, TexCoord0); \n" + " vec4 outTexel = texture2D(PaletteTex, paletteIndex.xy); \n" + " gl_FragColor = outTexel;\n" "}\n"; @@ -49,17 +49,11 @@ const GLchar *PassthroughVertShaderSrc = "COMPAT_VARYING vec4 COL0;\n" "COMPAT_VARYING vec4 TEX0;\n" "\n" - "vec4 _oPosition1; \n" "uniform mat4 MVPMatrix;\n" "\n" "void main()\n" "{\n" - " vec4 _oColor;\n" - " vec2 _otexCoord;\n" - " gl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];\n" - " _oPosition1 = gl_Position;\n" - " _oColor = COLOR;\n" - " _otexCoord = TexCoord.xy;\n" + " gl_Position = MVPMatrix * VertexCoord;\n" " COL0 = COLOR;\n" " TEX0.xy = TexCoord.xy;\n" "}\n"; @@ -93,7 +87,7 @@ const GLchar *PaletteFragShaderSrc = "\n" "void main()\n" "{\n" - " vec4 index = COMPAT_TEXTURE(SurfaceTex, TEX0.xy);\n" - " vec4 texel = COMPAT_TEXTURE(PaletteTex, index.xy);\n" - " FragColor = texel;\n" + " vec4 paletteIndex = COMPAT_TEXTURE(SurfaceTex, TEX0.xy);\n" + " vec4 outTexel = COMPAT_TEXTURE(PaletteTex, paletteIndex.xy);\n" + " FragColor = outTexel;\n" "}\n"; diff --git a/src/render.c b/src/render.c index e6ae058..de52f06 100644 --- a/src/render.c +++ b/src/render.c @@ -231,8 +231,6 @@ DWORD WINAPI render_main(void) glBindVertexArray(0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glUniform4f(glGetAttribLocation(paletteConvProgram, "Color"), 1, 1, 1, 1); - const float mvpMatrix[16] = { 1,0,0,0, 0,1,0,0, @@ -316,8 +314,6 @@ DWORD WINAPI render_main(void) glUniform2fv(glGetUniformLocation(scaleProgram, "OutputSize"), 1, outputSize); glUniform2fv(glGetUniformLocation(scaleProgram, "TextureSize"), 1, textureSize); glUniform2fv(glGetUniformLocation(scaleProgram, "InputSize"), 1, inputSize); - - glUniform4f(glGetAttribLocation(scaleProgram, "Color"), 1, 1, 1, 1); glUniform1i(glGetUniformLocation(scaleProgram, "FrameDirection"), 1); const float mvpMatrix[16] = {