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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
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.