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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.