I'm using OpenGL with SDL and i've got a little problem with GLSL if i try to squeeze the image in the Post-Processing-Shader, for example:
is working perfectly, first one outputs the normal screen and the second one stretches it and you can't see the complete viewport, butCode :outColor = texture2D(texture, vec2(vTexCoord.x, vTexCoord.y)); and outColor = texture2D(texture, vec2(vTexCoord.x * 0.5, vTexCoord.y));
squeezes the output but also makes it much much darker, with 1.2 its not a big deal but with 1.8 its complete black. oOCode :outColor = texture2D(texture, vec2(vTexCoord.x * 1.5, vTexCoord.y));
(the shader is really that simple for testing, only the inputs, the uniform and this line)
If i clear the viewport with red for example and don't render anything it is the same.. getting darker and darker red until black with higher values.
If i try to put a .png file as texture to the shader its working perfectly, no color-differences even with 4.0 or more.
The Framebuffer-Init-Code is from a Tutorial and with my older GLUT-programs the squeezing works fine, only after switching to SDL (and splitting the code into classes) the result is as described before.
It would not make any sense to post the complete code, because its too much splitted^^ but if you tell me where the bug could be i can add the lines or look at it myself.
Any help or tips where i could find help would be very nice. I usually try to solve my problems by myself but the information about shader is very small on the web.