Search Issue Tracker
By Design
Votes
0
Found in [Package]
12.0.0
Issue ID
1324926
Regression
No
[ShaderGraph] Visual artifacts between two colors when using Replace Color Node for changing the Sprite colors
How to reproduce:
1. Open the user's attached "Test Project.zip" project
2. Open the "Main" Scene
3. Observe the Sprite in the Game view
Expected result: No artifacts on the Sprite
Actual result: Visual artifacts in places of the Sprite where color about to change
Reproducible with: 10.4.0 (2020.3.2f1), 11.0.0 (2021.1.2f1), 12.0.0 (2021.2.0a11)
Could not test with: 7.5.3 (2019.4.23f1) - Due to Shader Graph not working after downgrading
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Looking at the setup, it looks as though the hlsl code is doing what it is supposed to. There are small differences in the color of the image where the replace is happening. With the current node settings, any color within 1% of the original selected color is replaced. In the provided example, the two closest colors are 1.4% distant from eachother (on the cheek shadow). Increasing the range on the replace color node and allowing some fuzziness seems to grab more of what looks like the correct color, but is still not perfect. Its possible the image might have been compressed or interpolated in some way on the asset side, maybe by some importer change with the LTS version? It may be worthwhile to use mask textures to provide better control on the output color rather than using color replacement and getting small artifacts like these.