Forum

Passive (interlaced) 3D shader?

I just realized that since the passive 3D displays like the Viewsonic V3D231 and LG D2342P use a system where the right and left images are interlaced into one 1080p frame, that it should be pretty easy to write a shader to do this. This would mean that you wouldn’t have to fool with TriDef/nvidia 3D drivers, and the image would just display properly in 3D directly from vvvv.

So before writing one, I thought I’d check that I’m not duplicating work. Does some kind of interlace shader already exist? I haven’t been able to find one searching here. Thanks!

I’ve found the term “interlaced” on these forums to refer to alternating images, and wanted to clarify my query:

By “interlace”, I mean as in interlaced video where two “fields” are combined into one “frame” by alternating their lines. So for 3D, say the right image is on the odd lines and the left image on the even lines. The 3D monitors have small polarizers on each line of the display so the passive polarized glasses (like in the movies) see a different set of lines for each eye.

create 2 textures from both point of views and combine it in a custom hlsl something like:

float2 PxCoord = In.TexCd*ScreenSize.xy
if((PxCoord.y%2)==0) return tex2D(SampTex1, In.TexCd);
else return tex2D(SampTex2, In.TexCd);

Thanks microdee, that looks even simpler than I imagined. I assume that sampling should be set to point, or will that not make a difference in this case? I’ll give it a shot as soon as my new monitor gets here!

yep set filtering to point that gives more punctual result

@microdee - filtering shouldn’t affect the sharpness of the cross-over (only the data within each interleave).

OK, here’s a quickie version that works with my brand-new LG D2342P. I’ll put it in contrib as soon as I get a help file together. Thanks microdee!

3DInterlace.fx (3.6 kB)