Forum Discussion
wangxiaogangan
7 years agoExplorer
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 ab...
wangxiaogangan
7 years agoExplorer
After some experiment,i should post some detail information for "Overlay" & "Underlay".
1. If using "Underlay" to render something, in ther first we should know that "Underlays depend on the alpha channel of the render target.", which render target is eye buffer.
base on this rule, if we want render a ui panel ( panel contian white background and 3 image ) shown belown with "Underlay", we should clear eye buffer's alpha = 0, so ui panel can blend with eye buffer.
base on this rule, if we want render a ui panel ( panel contian white background and 3 image ) shown belown with "Underlay", we should clear eye buffer's alpha = 0, so ui panel can blend with eye buffer.
the easy way to clear alpha in the demo is draw a black quad with shader "Underlay Impostor" in the same position of "underlay" quad.
2. what make me feel very odd is the blend formula for "Underlay" & eye buffer.
if i change the black quad, which clear alpha = 0 & shader using "Underlay Impostor", make its color into green,
i found that even though green quad's alpha =0, underlay still can blend its color with green quad.
this confirm the blend formula is not in the default way, which is
eye.Color * eye.Alpha + underlay.Color * (1 - eye.Alpha)
SO, event eye buffer aplha = 0, i still found no way to just show ui panel's color. that is very unreasonable for the situation using "Underlay" to draw a panel.
( in addition, i know "overlay" can blend very well because its using "overlay" rt's alpha, but "overlay" can not handle 3d model in front of panel. For example in the pic, white ball will always hide behind overlay panel )
3. Could oculus staff give a function to change the blend formula in the later version? i need this default blend method very much to draw ui panel using "underlay"
( in addition, i know "overlay" can blend very well because its using "overlay" rt's alpha, but "overlay" can not handle 3d model in front of panel. For example in the pic, white ball will always hide behind overlay panel )
3. Could oculus staff give a function to change the blend formula in the later version? i need this default blend method very much to draw ui panel using "underlay"
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 25 days ago