Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
sycx's avatar
sycx
Explorer
8 years ago

OVROverlay issues

We use OVROverlay to display a static stereo cubemap image.

We found there are some issues in OVROverlay implementation:

1. GPU Memory wasteful
As current implementation. we submit a texture(appTexture) to OVROverlay. then based on it, OVROverlay creates 3 stage texture and copy contents from appTexture.
With stereo layout. the number of textures in GPU will be 8 (4 per eye).
Since our texture is static. the extract 3 textures per eye are unnecessary.

Is there any way to reduce the stage count or reuse same texture on every stage? 

2. Heavily texture copy operation

OVROverlay does one Blit operation and one CopyTexture operation on every frame. even the appTexture is unchanged.
There is a field named `isDynamic`, as it's comment says: `If true, the texture's content is copied to the compositor each frame.`
But in fact. It does nothing except changing frameIndex. texture's content still copied on each frame









Environment: Unity 2017.4.1f / Oculus Utilities 1.24.0

1 Reply

Replies have been turned off for this discussion

  • sycx said:

    We use OVROverlay to display a static stereo cubemap image.

    We found there are some issues in OVROverlay implementation:

    1. GPU Memory wasteful
    As current implementation. we submit a texture(appTexture) to OVROverlay. then based on it, OVROverlay creates 3 stage texture and copy contents from appTexture.
    With stereo layout. the number of textures in GPU will be 8 (4 per eye).
    Since our texture is static. the extract 3 textures per eye are unnecessary.

    Is there any way to reduce the stage count or reuse same texture on every stage? 

    2. Heavily texture copy operation

    OVROverlay does one Blit operation and one CopyTexture operation on every frame. even the appTexture is unchanged.
    There is a field named `isDynamic`, as it's comment says: `If true, the texture's content is copied to the compositor each frame.`
    But in fact. It does nothing except changing frameIndex. texture's content still copied on each frame









    Environment: Unity 2017.4.1f / Oculus Utilities 1.24.0


    Disclaim, we are on the same project.

    My thought on current overlay implementation. Though the current design make it convenient to update content on overlay frame by frame(i.e, animations, etc), for static contents, it is just way too much expensive.

    For an older version of SDK, the overlay can use a native texture provided by app, which is exactly what we did: we create a shared OpenGL context in background thread, load a really big texture(pano over 4k resolution), then smoothly switch the texture handler of overlay's when the texture is ready(in render thread). This totally avoided the expensive texture copy operation, and the unnecessary triple buffer textures. Is there anyway to restore this behavior?