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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.