The Himalayas, IN · UTC+5:30
← All tools

Meta XR SDK Occlusion Distance Fix (Unity 6+)

TypeArtist Tools
HostUnity
StatusMatured
SourceOpen source
LanguageC#
Description

Removes the limitation in the Meta Quest SDK occlusion system where game objects stop rendering beyond the depth sensor's range. Out of the box, anything virtual past the sensor's reach simply disappears in mixed reality — this fix lets distant virtual objects live alongside environment-depth occlusion.

Using it

The fix ships as a custom HLSL include that wraps the SDK's occlusion logic. In your shader:

#include "EnvironmentOcclusionURPCustom.hlsl"
// Apply custom occlusion logic
META_DEPTH_OCCLUDE_OUTPUT_PREMULTIPLY(input, finalColor, 0);

The custom include references the original Meta SDK file — point the include at the SDK's actual package path:

#include "../EnvironmentOcclusion.cginc" // Path to the sdk file

Built for Unity 6 and above, where the Meta occlusion system lives.

← Back to tools