Search Issue Tracker
By Design
Votes
0
Found in
2021.3.53f1
2022.3.63f1
6000.0.51f1
6000.1.8f1
6000.2.0b7
Issue ID
UUM-109710
Regression
No
[MacOS] NaN value appears in a shader when using the EmissionTint parameter property that is not properly initialized
Steps to Reproduce:
1. Open the “user’s attached project”
2. Open “SampleScene”
3. Observe the “Cube” GameObject through the Game view
Expected result: The GameObject is colored in beige, brown, and blue details
Actual result: The GameObject is colored white
Reproducible with versions: 2021.3.53f1, 2022.3.63f1, 6000.0.51f1, 6000.1.8f1, 6000.2.0b7
Couldn’t test with versions: 2022.1.0b1 (due to the material being missing from the GameObject)
Reproducible on: macOS 15.5 (M1 Max)
Not reproducible on: Windows 10
Notes:
- Also reproducible in Standalone Player
- The ShaderGraph appears to determine that the shader is not using the EmissionTint parameter. As a result, it does not set up this property during the draw call. However, on macOS, the shader seems to use the EmissionTint parameter, but the property is not properly initialized. This leads to a NaN (Not a Number) value in the shader, causing the rendering issue.
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
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- GC.Alloc called by HDRenderPipeline.LensFlareMergeOcclusionDataDrivenPass() when playing the default HDRP Sample Template project
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
Resolution Note:
We don't aggressively optimize our nodes to prevent unintended performance costs. However, not all mathematical operations behave the same across all platforms under all circumstances. Compiler and fastmath optimizations as well as differently handling for undefined behavior can mean different results. Both the Mac and Windows results in the final shader are likely not doing what you want.
In the case provided, I believe the core issue is that the base input for the Power node (parameter A), must not be 0.
You can sanitize the value by using Maximum or Clamp to keep the value above 0 (ie. 0.0001), or you can use the Comparison and Branch node to skip the operations.