Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenticular shader should support texture arrays #7

Open
mcclure opened this issue Nov 5, 2021 · 0 comments
Open

Lenticular shader should support texture arrays #7

mcclure opened this issue Nov 5, 2021 · 0 comments

Comments

@mcclure
Copy link

mcclure commented Nov 5, 2021

When rendering a scene from multiple angles at once (as is common in VR, and needed for Holoplay) there are three basic options:

  1. Render the scene multiple times.
  2. Do an instanced render to a single texture, and assign different viewports for each instance.
  3. Do an instanced render, and render to texture arrays.

(2) and (3) can be a significant performance improvement in OpenGL over (1).

However, (2) is for various reasons problematic. In particular (2) is not available on all OS/hardware configurations (for example if I'm not mistaken (3) is available on Apple OpenGL but not (2), because texture arrays were added in OpenGL 3 but glViewportArray did not become core until OpenGL 4).

Holoplay SDK ingests a "quilt" grid of rendered images, which limits your options to (1) or (2). [Yes, you could also render to a texture array and then blit the texture array to a quilt, but this would require an additional bandwidth-intensive step per frame.] However, the "ingestion" is done by the lenticular shader, and the lenticular shader doesn't seem to be very long.

"Expected behavior": I think it would be pretty easy to alter the lenticular shader so that rather than taking its source images from a quilt, it took the source images from a texture array. But it would probably be necessary for Looking Glass to do this modification, because (due to the IP restrictions on the lenticular shader) a third party would not be able to redistribute the modified source. This would make it easier to support Holoplay from engines which are already based around texture arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant