diff --git a/src/libprojectM/Renderer/Renderer.cpp b/src/libprojectM/Renderer/Renderer.cpp index 1f2bfdfc0..5221e2f3c 100644 --- a/src/libprojectM/Renderer/Renderer.cpp +++ b/src/libprojectM/Renderer/Renderer.cpp @@ -838,12 +838,7 @@ void Renderer::UvToMathSpace(float u, float v, float* rad, float* ang) void Renderer::InitCompositeShaderVertex() { // BUILD VERTEX LIST for final composite blit - // note the +0.5-texel offset! - // (otherwise, a 1-pixel-wide line of the image would wrap at the top and left edges). memset(m_comp_verts, 0, sizeof(composite_shader_vertex)*FCGSX*FCGSY); - - float fHalfTexelW = 0.5f / (float)vw; // 2.5: 2 pixels bad @ bottom right - float fHalfTexelH = 0.5f / (float)vh; float fDivX = 1.0f / (float)(FCGSX-2); float fDivY = 1.0f / (float)(FCGSY-2); for (int j=0; jx = sx; pComp->y = sy; @@ -932,17 +927,22 @@ void Renderer::InitCompositeShaderVertex() { { *(cur_index+0) = (y )*FCGSX + (x ); *(cur_index+1) = (y )*FCGSX + (x+1); - *(cur_index+2) = (y+1)*FCGSX + (x ); + *(cur_index+2) = (y+1)*FCGSX + (x+1); *(cur_index+3) = (y+1)*FCGSX + (x+1); + *(cur_index+4) = (y+1)*FCGSX + (x ); + *(cur_index+5) = (y )*FCGSX + (x ); } else { *(cur_index+0) = (y+1)*FCGSX + (x ); *(cur_index+1) = (y )*FCGSX + (x ); - *(cur_index+2) = (y+1)*FCGSX + (x+1); + *(cur_index+2) = (y )*FCGSX + (x+1); *(cur_index+3) = (y )*FCGSX + (x+1); + *(cur_index+4) = (y+1)*FCGSX + (x+1); + *(cur_index+5) = (y+1)*FCGSX + (x ); } - cur_index += 4; + + cur_index += 6; } } } @@ -996,7 +996,7 @@ void Renderer::CompositeShaderOutput(const Pipeline &pipeline, const PipelineCon } - int primCount = (FCGSX-2)*(FCGSY-2)*4; + int primCount = (FCGSX-2)*(FCGSY-2)*6; composite_shader_vertex tempv[primCount]; memset(tempv, 0, sizeof(composite_shader_vertex) * primCount); int src_idx = 0; @@ -1017,7 +1017,7 @@ void Renderer::CompositeShaderOutput(const Pipeline &pipeline, const PipelineCon glBindVertexArray(m_vao_CompositeShaderOutput); // Now do the final composite blit, fullscreen; - glDrawArrays(GL_TRIANGLE_STRIP, 0, primCount); + glDrawArrays(GL_TRIANGLES, 0, primCount); glBindVertexArray(0); diff --git a/src/libprojectM/Renderer/Renderer.hpp b/src/libprojectM/Renderer/Renderer.hpp index 3c5804673..f525c7c4a 100644 --- a/src/libprojectM/Renderer/Renderer.hpp +++ b/src/libprojectM/Renderer/Renderer.hpp @@ -157,7 +157,7 @@ private: float SquishToCenter(float x, float fExp); void UvToMathSpace(float u, float v, float* rad, float* ang); composite_shader_vertex m_comp_verts[FCGSX*FCGSY]; - int m_comp_indices[(FCGSX-2)*(FCGSY-2)*4]; + int m_comp_indices[(FCGSX-2)*(FCGSY-2)*6]; };