- Home /
CalculateInterpolatedLightAndOcclusionProbes retrieves occlusionProbes as (1,1,1,1)
Hello everybody.
I'm trying to use DrawMeshInstancedProcedural to draw meshes and is working okay except occlusion part.
The example for occlusion I use is: https://docs.unity3d.com/ScriptReference/LightProbes.CalculateInterpolatedLightAndOcclusionProbes.html
I don't have a light probes. But I generated occlusion probes and occlusion works okay in my scene except gpu instanced meshes.
The part of the code is:
var occlusionprobes = new Vector4[count of instances of the mesh]; LightProbes.CalculateInterpolatedLightAndOcclusionProbes(positions, null, occlusionprobes);
In positions I put positions to where will be gpu instances of my mesh.
But I always get Vector4 (1,1,1,1) like if I had a scenario described in the documentation:
"If there are no probes baked in the Scene, the ambient probe will be written to the lightProbes array and Vector4 (1,1,1,1) will be written to the occlusionProbes array."
Could you please help me with that? Maybe I have some misunderstanding of the concept or what it could be?
Thank you.