Forum Discussion
AbdulVR
11 years agoHonored Guest
Distortion mesh gaps
Hello, I was wondering what kind of voodoo I need to apply to the distortion mesh coordinates to get it to fill the entire visible area. This is what I have so far: http://i61.tinypic.com/350a104.p...
lamour42
11 years agoExpert Protege
Hi,
Using ovrHmd_CreateDistortionMesh() gives nice screen coordinates already in the range -1,-1 to 1,1. So it is pretty much maxed out already. Then I just use the proposed Vertex and Pixel Shaders from the SDK Dev Guide (only reformatted to use structs instead of plain argument lists).
I didn't really get what you were trying to achieve with your depth buffer trick. Depth Buffer should be disabled completely for distortion rendering. Enabling it would explain that the distortion mesh is not the size you expect - depending on the z value you used in the shaders.
IMO nothing is ever drawn to the dead zone anyway. So there is no performance to gain from trying to optimize dead zone rendering: First you render without distortion to a rectangular area. Then - using the distortion mesh and shaders - you map that rectangular area (all of it) to the visible area. The invisible black areas will not be drawn.
Lam
Using ovrHmd_CreateDistortionMesh() gives nice screen coordinates already in the range -1,-1 to 1,1. So it is pretty much maxed out already. Then I just use the proposed Vertex and Pixel Shaders from the SDK Dev Guide (only reformatted to use structs instead of plain argument lists).
I didn't really get what you were trying to achieve with your depth buffer trick. Depth Buffer should be disabled completely for distortion rendering. Enabling it would explain that the distortion mesh is not the size you expect - depending on the z value you used in the shaders.
IMO nothing is ever drawn to the dead zone anyway. So there is no performance to gain from trying to optimize dead zone rendering: First you render without distortion to a rectangular area. Then - using the distortion mesh and shaders - you map that rectangular area (all of it) to the visible area. The invisible black areas will not be drawn.
Lam
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
- 11 months ago
- 10 months ago
- 6 months ago
- 5 months ago