summaryrefslogtreecommitdiff
path: root/src/gl_calls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gl_calls.cpp')
-rw-r--r--src/gl_calls.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gl_calls.cpp b/src/gl_calls.cpp
index 39dba50..82e8be2 100644
--- a/src/gl_calls.cpp
+++ b/src/gl_calls.cpp
@@ -118,23 +118,18 @@ const char *BlendFragmentShaderSource = "#version 330 core\n"
"uniform sampler2D Texture;\n"
"uniform sampler2D Texture1;\n"
"uniform vec3 InputCol;\n"
-"uniform float Rad;\n"
+"uniform vec2 ScreenDimensions;\n"
"void main()\n"
"{\n"
-" float Rada = Rad;\n"
-" vec2 XRotation = vec2(cos(Rada), sin(Rada));\n"
-" vec2 YRotation = vec2(sin(Rada), -cos(Rada));\n"
-" vec2 XAxis = (TexCoord.x - 0.5) * XRotation;\n"
-" vec2 YAxis = (TexCoord.y - 0.5) * YRotation;\n"
-" vec2 NewCoord = vec2(0.5, 0.5) + vec2(XAxis + YAxis);\n"
+" vec2 NewCoord = gl_FragCoord.xy / ScreenDimensions;\n"
" vec4 Col = texture(Texture, TexCoord);\n"
" vec4 Dest = texture(Texture1, NewCoord);\n"
" FragColor = Dest + Col;\n"
" FragColor = ((1.0f - Dest * 2) * Col * Col) + (Dest * 2 * Col);\n"
-" FragColor.a = Col.a;\n"
-" FragColor = Col + Dest;\n"
"}\0";
+// " vec2 NewCoord = vec2(0.5, 0.5) + vec2(XAxis + YAxis);\n"
+
static void GL_InitDefaultShader(uint32 *VertexShader, const char *VertexShaderSource,
uint32 *FragmentShader, const char *FragmentShaderSource,
uint32 *ShaderProgram)
@@ -439,8 +434,8 @@ GL_RasterizeShape2(gl_effect_layer *TestM, gl_effect_layer *TestM2, void *Stroke
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, TestM2->FramebufferObject);
- glBlitFramebuffer(0, 0, 2000, 2000,
- 0, 0, 2000, 2000,
+ glBlitFramebuffer(0, 0, 3200, 1720,
+ 0, 0, 3200, 1720,
GL_COLOR_BUFFER_BIT, GL_LINEAR);
glBindFramebuffer(GL_FRAMEBUFFER, TestM->FramebufferObject);