1
Graphics / Re: Shader performance
« on: December 08, 2013, 06:11:18 pm »
http://pastebin.com/9trE982C <- here is my code
The code of the shader:
The shader examples are running smooth, maybe the old and slow VGA is the problem.
The code of the shader:
uniform sampler2D texture;
const vec4 res1 = vec4(1.0, 1.0, 0.3, 1.0);
const vec4 res2 = vec4(0.0, 0.0, 0.66666, 1.0);
void main()
{
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
gl_FragColor = pixel.a * res1 + (1.0 - pixel.a) * res2;
}
const vec4 res1 = vec4(1.0, 1.0, 0.3, 1.0);
const vec4 res2 = vec4(0.0, 0.0, 0.66666, 1.0);
void main()
{
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
gl_FragColor = pixel.a * res1 + (1.0 - pixel.a) * res2;
}
The shader examples are running smooth, maybe the old and slow VGA is the problem.