Forum Discussion
bluenote
9 years agoExplorer
Missing documentation of high-quality / mipmapped rendering features
The current documentation is very vague when it comes to the high-quality layers feature. In particular I cannot find any good documentation of:
- ovrTextureSwapChainDesc.MipLevels: What does this change exactly and why is it set to 1 in all the basic examples which apparently do not use mipmapped textures? What value is recommended here for a high-quality layer? All I know is that I get a black screen when increasing this to 2.
- ovrTextureSwapChainDesc.SampleCount: The only information I could find is "Current only supported on depth textures", which confuses me since I wasn't even aware that I can pass depth textures. As far as I can see we always pass color textures anyway?
- ovrTextureMisc_AllowGenerateMips: The misc flags of ovrTextureSwapChainDesc allow to pass this flag. I haven't found anything on that yet. What does it do and is this a requirement for a high-quality layer? In OpenGL does this take care of calling glGenerateMipmap for instance?
- What other things are required to get high quality layers to work. For instance in OpenGL, am I supposed to set glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR) myself or does the SDK take care of this? Similarly, am I supposed to call glGenerateMipmap at the end of my rendering or is this already part of submitting a frame?
7 Replies
- thewhiteambitAdventurer++ for me, oculus they should hire a person to write a manual for the API and another one to proof read it! I was also wondering how this should be used for mipmapping. Had no time to reverse engineer it, like I did with a lot of other undocumented API parts.
- galopinHeroic ExplorerExpect the high quality flag ( thathas a hidden documentation ) everything else is well know of regular graphic progs and not vr related.
Mip = 1 means no mip, mip = 0 means full mip chain down to 1x1
Samplecount is for msaa rendertarget
Allowgenerate mip means you enable a DirectX API call to autogenerate the mips from the mip 0 ( if the texture has mip count >1)
There is a foveyedepth layer taking a depth texture, it is suposed to help a positional time warp, but this is not really practical, especially because translucent lacks dehth.
High quality flag has a doc, the only thing it does is to turn on an anisotropic 4x on the texture samplers. Up to you to decide what you want it or not.
I put the timewarp and distortion shader assembly in an other post, there is no shader difference with high quality, only aniso is impacted
It is true the sdk doc is not that great and it has a lot of missing features and levers and the black box thing they believe tobe the only good way is an error and annoyance. But programmers should be crying pussies like that :) - bluenoteExplorerAwesome, thanks for the clarification!
Do you happen to have some reference for the mip 1/0 stuff? I don't remember having seen this before, is this DirectX specific? Seems like a pretty counter-intuitive usage of 0 and 1 :).
And do you know what AllowGenerateMips does in OpenGL?
Overall, the documentation seems to focused on DirectX. I have only worked with OpenGL, which makes the guessing slightly more difficult. A few sentences here and there like your mip 0/1 hint definitely wouldn't hurt. - galopinHeroic ExplorerThe 0/1/N thing is at least as old as direct x 8 if my memory is good.
If you look at this structure, you will see how close it is to the desc from the ovr sdk ( and for a reason, as it acts as a proxy for CreateTexture2D ) : https://msdn.microsoft.com/en-us/library/windows/desktop/ff476253(v=vs.85).aspx
To be happy in life, i don't get close to opengl, especially on windows, auto generate mips is a feature of the past anyway, it is better if you want to generate mips to do it yourself ( yes it is a page long function to write, write it once and be happy, and you can then tweak the process to your needs ) - bluenoteExplorerThanks a lot -- good to know where this is coming from. However this is precisely the point: In OpenGL these things don't apply and it is unclear what the SDK does internally.
Any chance of a quick official clarification? - thewhiteambitAdventurerdo you know anything about the ovrTextureMisc_AllowGenerateMips flag? will it autogenerate mipmaps? had no time to figure out and would love to save some time on this...
- galopinHeroic ExplorerAs i said, on dx, it only allow to use a special device context call to let the driver do the mips. It is still up to the developer to create a texture with more than 1 mip, either using 0 in the descriptor at creation or the count of you choice (no mip is 1 as a reminder).
The flag is only to use a helper, you don't really need it if you generate the mips yourself (pixel shader or compute shader).
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
- 14 days ago