2 cameras shaders
Posted: Mon May 03, 2010 6:19 pm
Hi,
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:
where I have 2 Tex parts (leftTex and rightTex for left and right eye). This is the shader for dual output, another technique I'd like to make this way is quadbuffer. Thank you for help.
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));
}