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.

feature request for overlay layer:expose native shader of overlay mesh in android plantform

wangxiaoganganwangxiaogangan Posts: 21
Brain Burst
edited September 2019 in Unity Development
First of all, I truly appreciate Oculus's overlay layer tech for media player developers, which make video looks sharper & less judder.
My team has been contributing to develop "view-based media player", the main method uses 24 quadrilateras to combine mesh into what just right cover camera's view. it works well while 24 quads rendered by unity mesh & shader, but we want to introduce this method into overlay, letting overlay renders the 24 quad. 

I check the newest sdk v1.40, the overlay layer tech could coustom their mesh through vertexs & uv & triangle index by OVROverlayMeshGenerator, but there is no way to custom overlay's mesh shader though sdk v1.40. As for as i know, there should be program id created by gles though glCreateShader, which use for overlay mesh shadering.

so, could oculus staff update unity's sdk in future to support changing overlay's mesh shader? Somehitng like i can pass gles style shader into api and got the shader id, so i can modify params by native .so libary and render something very flexibly. 



  • ForwardXP_JimForwardXP_Jim Posts: 3
    You can't change the shader that draws the overlay because the overlay curvature is generated in the overlay's fragment shader and you'd have to include it the new shader.  It doesn't seem like this is something Oculus is interested in exposing.

    You CAN however draw to a render texture using your shader and then have the overlay draw the render texture.  That is how I use the overlay to render our hud while still using Unity UI elements for the hud.
Sign In or Register to comment.