I'd like to make stereo support for irrlicht. I made many tests with different results, but I'd like to try using shaders. But I don't know how to use not simple shaders like:
Code: Select all
uniform sampler2D leftTex;
uniform sampler2D rightTex;
varying vec2 texCoord;
uniform int width;
uniform int height;
void main()
{
gl_FragColor = mix(
texture2D(leftTex, vec2(texCoord.x*2,texCoord.y)),
texture2D(rightTex, vec2(texCoord.x*2-1,texCoord.y)),
step(.5,texCoord.x));
}