• RuntimesUnity
  • Forward+ and SRP Batcher produces flickering artifacts

Hi all, here's what my game looks like with the Forward renderer.

All is well!

I've been looking forward to trying out the new shaders for the Forward+ renderer, but when I switch over, I get:

Hopefully, the gifs there capture the effect - wild flicking brightness between white and black, even totally transparent bits get it. When you pull the camera in close you can sometimes make out a noisy artifact across the surface:

I notice that when I turn off the SRP Batcher in the URP Asset, it's all okay again, no flickering.

This is Unity 2022.2.10, with the latest Spine 4.1 package and URP shaders downloaded. The specific shader I'm using is the URP>Spine>Sprite shader.

This is probably important: Sadly I cannot seem to reproduce this in a new project, with the "URP 3D Shaders" example scene (edited to use a perspective camera instead of orthographic, because Forward+ doesn't support that). This means it's probably a project specific setting that's wrong? This project of mine has been through lots of versions of Unity, URP and Spine, so perhaps there's some left-over setting that's misconfigured?

Here's my URP Asset:

And the URP Asset Renderer:

And here's an example SpineRenderer with its material:

Turning off those settings like Fog, Normals, Shadows and so on has no impact though, it's just the SRP Batcher tickbox that fixes/causes it, from what I've seen.

Happy to try different settings to see if I can reproduce the issue, or take screenshots of any settings that I've missed.

Have you ever seen these sorts of artifacts before?

Related Discussions
...

@Cranktrain Sorry to see you're encountering problems! Could you perhaps create a stripped-down copy of your project that still reproduces this issue, and send it to us as a zip package to contact@esotericsoftware.com (briefly mentioning this forum thread URL so that we know the context)? Then we can have a look at what's going wrong.

Well, never mind!

I was busy downsizing my project for you when I spotted in my packages that I had the 4.0 URP shaders instead of the 4.1 version. Sure enough, manually grabbing the 4.1 version and bringing it into the project solves this issue.

I'm a bit confused, because I've checked my git history and while I can see that I did add https://github.com/EsotericSoftware/spine-runtimes.git?path=spine-unity/Modules/com.esotericsoftware.spine.urp-shaders#4.1 to the manifest, I still ended up with the 4.0 version remaining? Even as I successfully got the 4.1 spine-unity in the same update. Perhaps a simple deletion of /Library/ would have cleaned things up, when it rebuilt?

    @Cranktrain Thanks for getting back to us, very glad to hear you've figured it out!

    Cranktrain I'm a bit confused, because I've checked my git history and while I can see that I did add https://github.com/EsotericSoftware/spine-runtimes.git?path=spine-unity/Modules/com.esotericsoftware.spine.urp-shaders#4.1 to the manifest, I still ended up with the 4.0 version remaining?

    Oh dear, this does indeed sound like a nasty issue to track down, good catch and thanks very much for sharing your insights! I assume that the Unity Package Manager does not view a changed source git URL as a reason to update a package as it would when the minimum version number would change to something higher than what it already has downloaded.

    I just had a quick test and unfortunately could not reproduce the behaviour locally by changing the git URL from #4.0 to #4.1, it automatically updated to the respective version immediately without having to manually hit the update button in the UPM window. Even with the UPM window closed Unity immediatly downloaded the respective package. At least it behaved like this (i.e. correctly) in Unity 2021.3.19 and 2022.2.5.