Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
7.1.1
Issue ID
1184299
Regression
No
ShaderGraph's Main Preview and Material's colors do not match when Power Node's B(1) value is changed to equal number
How to reproduce:
1. Open the attached '1184299.zip' project from the link given in Edit
2. Open 'SampleScene' Scene
3. Open 'New Shader Graph' Shader Graph
4. Set Power Node's B(1) value to 2
5. Notice that 'Cube' GameObject's material is white in the Scene View and Shader Graph's Main Preview material is black
Expected result: ShaderGraph's Main Preview material color match material's color
Actual result: ShaderGraph's Main Preview material color does not match material's color
Reproducible with: 2019.4.9f1( Shader Graph 4.1.0) , 2019.2.7f1 (ShaderGraph 6.9.0), 2019.3.0b4 ( Shader Graph 7.1.1), 2020.1.0a5 (Shader Graph 7.0.1)
Could not test: 2017.4.32f1 because Package Manager is not introduced, 2019.2.0a1, 2019.3.0a1 because of the package errors
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
- Shader warnings are being thrown after building Mixed Reality Template
- Error is thrown when entering play mode with build profiles docked and standalone profiler open
- The Player hangs when activating another maximized application
- [XR] Input is not registered and headset view is headlocked after entering Play Mode with Meta XR SDK on 6000.0.0b16 and higher
- Crash on RtlLookupFunctionEntry when using 10 or more GameObjects with Articulation Body component in the scene
Resolution Note:
Unfortunately this bug goes very deep into the shader system pipeline -- it's actually a bug / inconsistency in Microsoft's FXC and DXC shader compiler, which will optimize pow(-1, 2) to be 1.0, which is counter to their docs on the behavior of pow (it should always return NaN when the first input is less than zero).
There's no easy way to correct the preview behavior within ShaderGraph to match the "final" result, and we don't want to incur the performance penalty or compatibility issues around changing the "final" behavior of the pow node to be more consistent.
We will just have to be a note on the docs for the node.