Forum Discussion
OrangeFlower
8 months agoExplorer
The Different Depth Textures Get from Quest
In Depth-API sample, I notice that in ShowDepthMap.shader, it suggest that switching different code in shader.
fixed4 frag (Interpolators i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float3 uv = float3(i.uv, 0);//just show one texture so we don't get eye strain
fixed4 col = _PreprocessedEnvironmentDepthTexture.Sample(sampler_PreprocessedEnvironmentDepthTexture, uv);
//Uncomment the line below and comment the line above to change between the preprocessed depth texture and the raw depth texture
// fixed4 col = _EnvironmentDepthTexture.Sample(sampler_EnvironmentDepthTexture, uv);
col.rgb = float3(col.r, col.r, col.r);
col.a = 1;
return col;
}I want to now what's the differece between _PreprocessedEnvironmentDepthTexture and _EnvironmentDepthTexture.
And what are the data in them rgb channel?
BTW, I want to know is there any metric in depth map for reference? Because I want to restruct the distance data from the depth map, I want to know what is the real distance match to the grayscale value in the texture.
Any help will be appreciate! Thanks!
Yes, you may find the usage in:
https://github.com/oculus-samples/Unity-DepthAPI/issues/80
2 Replies
Replies have been turned off for this discussion
- GustorvoProtege
Have you figured it out? I'm trying to achieve the same thing...
- OrangeFlowerExplorer
Yes, you may find the usage in:
https://github.com/oculus-samples/Unity-DepthAPI/issues/80
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
- 2 months ago
- 10 months ago
- 10 months ago
- 5 months ago