Is there any sample code for using QCOM OpenGL motions estimation extension? I couldn't find any on Adreno SDK or anywhere online.
The extension is discussed briefly in the blog post here: https://developer.qualcomm.com/blog/improving-vr-performance-using-motio...
The OpenGL QCOM entry is here: https://www.khronos.org/registry/OpenGL/extensions/QCOM/QCOM_motion_esti...
In particular, I am trying to figure out when to call glTexEstimateMotionQCOM, is there any binding/sync required and when the output will be ready. The extension says "The resulting motion vectors .... ready to be used by other application shaders and stages". Does it mean that the motion vectors will be available right after calling glTexEstimateMotionQCOM. In a native application, I called the function for two textures (backed by EGLImages), and bound the output texture (created using GL_RGBA16F format) to a framebuffer to read the motion vectors using glReadPixels into a float buffer. The motions are are all zero. To check the function for error cases, I tried passing invalid textures to the function. It didn't generate any INVALID_OPERATION error. No error in 'adb logcat' too. I confirmed that the extension is supported from glGetString(GL_EXTENSIONS). In short, the API glTexEstimateMotionQCOM had no effect. Any help is appreciated.
naveenkumar.p
Were you able to find the sample code? I am also looking for it without much success. Any help would be appreciated.
Thanks
Zee
I am also looking for any sample code that would utilize GL_QCOM_motion_estimation. I'm currently trying to use the extension on a GLSL shader in Unity. When starting my application I can see GL_QCOM_motion_estimation in the list of extensions.
And in my shader I have:
#extension GL_QCOM_motion_estimation : require
For some reason I get:
Dear tvkamara
This extension is for GL API usage, not for GLSL shader.
So you cannot use it in GLSL shader like "#extension GL_QCOM_motion_estimation : require".
Please study more from https://www.khronos.org/registry/OpenGL/extensions/QCOM/QCOM_motion_esti...
Thanks
Bob Du
Dear naveenkumar.p
1. The motion vectorrs should be ready once the calling of glTexEstimateMotionQCOM() return.
2. As for your below experiments, what are the 2 textures you used? Are they GL_8 format 2D Textures or Luminuance data of EGLImage as required by spec?
>> In a native application, I called the function for two textures (backed by EGLImages), and bound the output texture (created using >>GL_RGBA16F format) to a framebuffer to read the motion vectors using glReadPixels into a float buffer. The motions are are all zero.
spec:
Thanks
Bob Du
I have tried to implement the extension for a snapdragon 888 with adreno 660 and the latest android NDK, but there doesn't seem to be a version of the opengl ES library within the NDK that contains the extension. I have checked that the extension exists on the device, but I cannot access the extension through the opengl ES headers currently in the NDK. Has a sample app already been published or going to published soon? Any help would be greatly appreciated.
Dear Customer
Can you get the API function poitner from eglGetProcAddress("glTexEstimateMotionQCOM")?
Thanks
Bob Du