Skip to main content
New Participant
April 7, 2013

Code for applying distortion

Hi all,

my C++ and DirectX knowledge is very limited, so I have a hard time coming to grips with the rendering part of the SDK.

For now I'd like to create a simple stereo viewer. Load 2 images (left eye and right eye), distort them properly and combine them into the one image for the Rift.

The issue is: I dont know how to apply the distortion filter (do I need to use Direct3D or can I apply the filter to a 2D image?). Can anyone provide some (simple) sample code of loading a texture and distorting it for the rift? The SDK code is not simple and all embedded in actual scene rendering code. C# would be best (if possible). C++ could also work.

Cheers

    21 replies

    Up and Coming
    May 14, 2013
    So, you are saying that the negative parallax, combined with the difference opacity of the lenses, is resulting in an illusion of relative motion in the image when I move my head (due to the Pulfrich effect).

    What makes me doubtful is that Pulfrich effect based 3D images have to be carefully constructed and a limited in what you can achieve, but every anaglyph image I've ever seen, including ones without negative parallax, exhibit this apparent parallax illusion. Also, the parallax is consistent which what you'd expect, while the Pulfrich effect sometimes creates an impression of paradoxical depth (which I have not personally experienced yet, but I did read).

    I think I can test this hypothesis with an experiment, but I'll need to think about it some more.

    (unrelated, but I'd attempt to draw anaglyph images on my whiteboard, but I don't have a cyan marker)
    (╯°□°)╯︵┻━┻