Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Oculus Mobile fixed foveated rendering— with textures?

mccmcc Posts: 37
Brain Burst
I am developing an Oculus Mobile app using the C++ SDK. My target is the Oculus Go (I am not concerned with any platform older than the Oculus Go). A basic version of my code (based closely on the VrCubeWorld_NativeActivity sample from the SDK) is here https://github.com/mcclure/lovr-oculus-mobile

I am interested in the Fixed Foveated Rendering feature of Oculus SDK described here here https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-ffr/ because I am using somewhat complicated fragment shaders. I tried inserting the recommended code "vrapi_SetPropertyInt( &Java, VRAPI_FOVEATION_LEVEL, 3 );" at the top of RenderThreadFunction in the NativeActivity.cpp file of my project. It did not appear to have any effect on framerate.

I have two questions.

1. Is there a simple way to verify foveation is occurring, or to observe foveation occurring within the headset?

2. What exactly is the effect of setting VRAPI_FOVEATION_LEVEL, and for what kinds of draws is it set? That is, when I draw, I draw by attaching to a framebuffer provided by the mobile sdk swapchain. When I set VRAPI_FOVEATION_LEVEL, with which draws is the new foveation associated? Does it change framebuffers? Does it change framebuffers which are added to the swapchain after VRAPI_FOVEATION_LEVEL is changed?

3. Say I render to a texture and then I render that texture to the screen, so that I can apply something like a postprocessing effect. Is it possible to control whether the texture has a foveation level, or what foveation level is used when drawing to the texture?

The concern I have is, if the point of foveation is that the fragment shader is called for a larger number of fragments (because the fragments are "large"), if I render to a non-foveated texture or framebuffer and then copy to the foveated eye, I will pay for fragment shades on all the additional non-foveated pixels even though they are not visible.


  • bkjbkj Posts: 159 Oculus Start Member
    1.) make 3d table with lots of text, with foveation level enabled you will see image degradation in the corners
    2.) 3.) it would be useful to have foveated rendering for the offscreen textures but I don't think that is possible atm
Sign In or Register to comment.