using filter() with vive ?

Issue #3 wontfix
Paul Plouchard created an issue

Hi,

I am trying to use a filter() function (with a custom shader that creates a glowing effect on some lines displayed).

When i use the ViveP5 instead of a simple camera (peasycam), the filter() function seems to make the app crash. An error message appears : "VRdraw function does not exist in MainApp"

As soon as i delete the line containing this filter() function, the app works fine.

Is there a solution to use this filter method with the vive ?

Thanks,

Comments (3)

  1. James Pazzi repo owner

    The filter command will consistently break the vive draw loop. It's a problem I'm aware of, but one that is difficult to fix as the way opengl frames are submitted to the compositor is not ideal. As far as I know there should be a better way to call the specific frame that is being drawn and submit it to the eye. Instead the values of 1 and 2 are swapped around until the right frame is issued to the correct eye. I suspect that when filter or background or other similar commands are run they create another opengl frame and it pushes or changes the order of the frames so they usually wont be pushed to the correct eye, or instead a seemingly blank frame is issued. It's something I've had trouble with, but basically the best way around it is to avoid these types of functions in your app.

    As a side note, I've found the filter method is quite slow and even if it were to work, the framerate would likely be too slow to effectively run the vive.

    Apologies for the late reply.

  2. James Pazzi repo owner

    Unsure how to correct - processing native functions like filter and background usually break the vive draw as bad frames are submitted to each eye. Refer to thread for more detail.

  3. Paul Plouchard reporter

    Hi James,

    Thanks for the reply,

    I stopped using my shader and filter() function. I knew it was about the filter being applied to one eye and not the other and i can understand it is complicated to fix.

    Anyway, my program works fine without shaders ;)

    Nice work on the viveP5 lib though !

  4. Log in to comment