Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.5f1
Issue ID
UUM-10401
Regression
No
CullingResults.GetReflectionProbeIndexMap returns an array that includes indexes of the Reflection Probes which are not visible
Reproduction steps:
1. Open the attached ‘Repro’ project
2. Open the ‘SampleScene’
3. Note that the ‘ReflectionProbe' GameObject is visible in the Game view
4. Observe the ‘Visible probes: Reflection Probe’ and 'Probe indexes: 0, 1’ messages logged in the Console
5. Move the 'ReflectionProbe' off the Game view
6. Observe the Console
Expected result: An array returned by the CullingResults.GetReflectionProbeIndexMap doesn't include indexes of the invisible Reflection Probes
Actual result: ‘Visible probes: ' and 'Probe indexes: 0, 1’ are logged in the Console
Reproducible with: 12.1.7 (2021.3.5f1)
Could not test with: 10.9.0 (2020.3.35f1), 13.1.8 (2022.1.9f1), 14.0.3 (2022.2.0a18), 15.0.0 (2023.1.0a3) (Nothing is logged in the Console)
Reproduced on: MacOS 11.6 (Intel)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
We are in the process of deprecating this API. Neither SRP uses this API, and it has never worked as intended, there is not an easy way to support this, and there isn't a proper workflow specified for how this data would be used.
Unity culls all lights by frustum and occlusion and put into the VisibleLightList. If the redner pipeline requests per-object lighting, then Unity does a PerObjectCulling that tests each light against each object and it builds a lightIndices list as follows:
[Obj0Light0, Obj0Light1, ... Obj0LightN, Obj1Light0, Obj1Light1, ... Obj1LightK, ... ObjZLightZ]
Per-object reflection probes would also have such a list. So when we setup state for drawing each object, we setup a variable that tells the offset and count into the visible light index list and visible reflection probe index list. So if you want to draw Obj0, you set offset as 0 and count as N+1. If you want to draw object 1, you set offset as N + 1 and count as K+1.
The buffer of visible light indices is based on the VisibleLight array. If the client side sorts the VisibleLight array, then we either you have to go back to the light index light and update all of it to the new sorted lights. Or you create an indirection to the light index map to tell how to map from the old light indices to the new light indices.
The identity of that is {0, 1, 2, ... N}. But let’s say you sort and swap VisibleLight[0] and VisibleLight[1], so you have to update the light index map to be {1, 0, 2, ... N }. The light index map is a remap list for both light indices and reflection probe indices, but they need to be seperate.
Please let us know if there is a real world scenario where this functionality would be useful or critical to performance.