some question for Blend Render Compositor layer( OvrOverlay ) with Opaque & Transparent model
First of all, Compositor layer contain two type, called them Overlay and Underlay. i have readed the post https://forums.oculusvr.com/developer/discussion/comment/536880#Comment_536880 which talk about how the 3d model correctly show or hide while using Compositor layer. i want ask a extra qustion to confirm my assumption for using Compositor layer right. Is Oculus Gear vr home app using "Underlay" to Render Ui Panel ? oculus staff said "we do use overlay in Gear VR home, and the fact is that everything is made by overlay in gear VR home", while gear controller & its white laser can display in front of ui panel shown below. if gear home using "Overlay" not "Underlay" to render ui panel into cylinder, i do not figure out a valid method to render controller & its laser in front of ui panel, because of "Overlay" blend with eye buffer using Overlay Rt's alpha value. while "Underlay" blend using eye buffer's alpha value. using Overlay Rt's alpha value for blend and "Overlay" render in front of all things, make the "Overlay" layer can not leak a hole to show the controller. consider what i assume is right, there must be "Underlay". so gear vr home need "poke a hole" for eye buffer while shader the hole's alpha = 0, which ui panel can blend into eye buffer correctly. Finally, the render action list for using Compositor layer combine with controller & room shown below: 1. render cinema and some opaque things except gear controller 2. render some transparent things except gear controller laser 3. in simple, clear total eye buffer alpha into 0 4. render controller & laser, write them alpha to corresponding location 4. Underlay ui panel blend with eye buffer, leave eye buffer alpha = 1 not blend so, Is it right render order for gear vr home ? but the method above can not handle the situation while gear controller behind the UI panel render using "Underlay" because their alpha already = 1. Or there contian other method to use"Overlay" render ui and make contrller render right? thanks for your time3.4KViews0likes7Commentsfeature request for overlay layer:set overlay layer texture uv matrix in unity
i had similar problem before "https://forums.oculusvr.com/developer/discussion/69025/compositor-layer-shape-feature-request-halfsphere-shape-using-for-180-video-in-unity", which talk about how to render 180 video with Equirect Layer. after a lot of search in oculus unity sdk & John Carmack's 5k strip media player, i found overlay should has some struct & api in native code like vrapi_DefaultLayerEquirect2 and its member called TextureMatrix in file MultiVideo.cpp which should use for change frag shader sample position. in case of 180 video, we just need set Equirect Layer's TextureMatrix to cut sample position by half in horizontal direction, when rendering overlay. currently i realize 180 video render with double Equirect Layer's texture width, while the right half texture render with black. but it kill performance badly. could oculus staff update unity's sdk in future, support changing Equirect Layer's texture uv when rendering? make layer's texture will ctrl its render shape with TextureMatrix, instead of just simple cover it.577Views0likes0Commentscompositor layer shape feature request: halfsphere shape using for 180 video in unity
my halfsphere overlay shape feature request comes from plyaing 180 video. after a few test in playing 360 video, i found that if playing 180 video with full sphere, i must double the texture2d in horizontal direction which render the extra pixels in clear color to make 180 video work. so, if i play a 1000 * 1000 normal 180 video, i will create texture in 2000 * 1000, and copy texture like this: TextureSize = new OVRPlugin.Sizei() { w = ( textures[0].width * 2), h = (textures[0].height) }; // just copy src into dst's half width & full height Texture et = layerTextures[eyeId].swapChain[stage]; Graphics.CopyTexture(textures[0], 0, 0, 0, 0, textures[0].width, textures[0].height, et, 0, 0, 0, 0); is there a way for render 180 video just using its video texture's size in overlay? not double its width or height or something killing performance.......611Views0likes0Comments