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.