Search Issue Tracker
Won't Fix
Votes
1
Found in [Package]
12.0.0
Issue ID
1344181
Regression
No
CameraSortingTexture SubShader captures Normals from _NormalMap
Reproduction steps:
1. Open project "case_1344181-2DLightBug (2)"
2. Open Scene "SampleScene"
3. Enter Play Mode
4. Open Frame Debugger from Window > Analysis
5. Click Enable in the Frame Debugger window
6. Go to the #9 Event in the Frame Debugger
7. Observe Game view
Expected result: CameraSortingTexture shouldn't capture normals
Actual result: CameraSortingTexture only captures normals
Reproducible with: 11.0.0 (2021.1.16f1), 12.0.0 (2021.2.0b4, 2022.1.0a3)
Could not test with: 2019.4.29f1, 2020.3.14f1 (Doesn't have CameraSortingLayer Texture)
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:
What is happening in this bug is that the _CameraSortingLayerTexture is being used after it has been freed and before it has been reallocated. Although it looks like it's capturing the normals, what is happening is the _CameraSortingLayerTexture is being used at an invalid time and is pointing to previously allocated memory that has been reused for normal rendering.
I have added a task to the backlog to point the _CameraSortingLayerTexture to a fixed texture (will either be black or pink) if it is not valid to be used, but as this could be a potential breaking change for some people, this needs design.
Additionally, I will be updating the documentation to warn against this use of the _CameraSortingLayerTexture