Based on the tutorial, "Red’ channel need to be turned off while blending. I have test with glColor3F to take out red channel but it just removed it but don’t blend as the tutorial.
glColor3f( 0.0f, 1.0f, 1.0f );
Could you share your idea?
If there is other way to make 3d image, it’s quite welcome
I’ve never tried to do anaglyph stereo, so don’t know anything about it, but I have heard lots of nightmare stories from lots of people trying to do it with opengl. Looking at Kyles code though, if that is what you want to do it is very doable with opengl. Two methods come to mind:
Write a fragment shader that takes two textures, and simply outputs left.r, (left.g+right.g)/2, right.b. This is probably the most efficient, and most flexible way. You can probably already find this shader online
Turn on additive blending, render the left image with glColor(1, 0.5, 0) and then render the right image with glColor(0, 0.5, 1); This method is so simple I’m questioning whether it would work or not - but it seems to me that it would do exactly what Kyle’s code is doing.
Thank you guys for all answers. Unfortunately it doesn’t generate correct images for 3D vision. After couple of different setting, I found a result making reasonable results.