Hello. This problem may sound a bit far-fetched, but it's critical for my project. I'm a Spine Pro customer.
Environment: Windows PC, Nvidia GPU, Unity 2019.3.8f1, URP 7.3.1, Spine runtime and shaders 3.8, Chrome 81.
Conflicting asset: https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/massive-clouds-screen-space-volumetric-clouds-131898
I've spent quite a bit of time identifying the issue and it's probably related to Spine URP Sprite shader, because none of the other transparent shaders have this problem.
The scene is made of sample assets, using the stretchyman_Material with enabled "Write to Depth" (won't reproduce when it's disabled).
Firefox screenshot (looks alright):
Chrome screenshot (broken):
GIF of this bug in the actual project:
Seizure alert. https://i.imgur.com/XTqrful.gif
Steps to reproduce:
- Open ReproductionScene in the Assets folder.
- File->Build Settings->Build on a WebGL platform.
- Run Chrome browser with this argument to allow launching local build:
allow-file-access-from-files
- Type build path in the address bar, like D:/Work/Trash/URPSpriteBugRepro/Builds/WebGL/index.html and hit enter.
- Observe the corrupted pixels on sprite edges. They are extremely bright and cause the bloom effect to go wild.
Reproduces on Opera as well.
I can't share the download link publicly since it's using a paid asset, so I've sent @Harald a personal message with minimal reproduction link, including build and the project.
Things I've done so far:
Disabling texture compression.
Trying to clamp output of ForwardPassFragmentSprite in Spine-Sprite-ForwardPass-URP.hlsl like so:
if (pixel.r > 1 || pixel.g > 1 || pixel.b > 1)
pixel.rgba = half4(0, 1, 0, 1);
return pixel;
Didn't work. Bright pixels do get green color, but the artifact still persists. Artifact colors are random as well: