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
- "Unsupported texture format R16 for a swizzle" error and texture is not correctly rendered when using texture Swizzle and reimporting texture asset
- Tab order is incorrect after re-ordering
- [Ubuntu] Red squares instead of ticks in dropdown options
- Multiple simultaneous input with the touch screen sometimes leaves button in not default state
- Crash on ShowDelayedContextMenu(bool) when changing the Size options of a Visual Element in the UIToolkit Inspector
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.