[Unity 2022.3.22f1] How to overlay a static texture on a sprite that uses a spritesheet with ShaderGraph?

Hey there, I’m trying to accomplish something I thought pretty basic: I want to overlay a static wire texture on a sprite that uses a spritesheet. The end result should look like this:


I’m simply using a Tiling and Offset node to tile a simple cross texture (7x7 pixels), then use a Lerp to add it to the base sprite.
Note that the sprite is part of a big spritesheet.

The issue is that I cannot find the right way to provide UV to the Tiling and Offset node, every possibility has issues:

  • Using “Position - Object” works well when the sprite is static, but when it moves the checker pattern slides across the sprite
    Untitled video - Made with Clipchamp

  • Using Screen space or World space position does not achieve what I want, as the checker pattern should stay static on the sprite even when it moves

  • Using the UV0 - UV3 does not work as the sprite is part of a spritesheet, so when the animation plays the UV change and therefore the checker pattern moves
    Untitled video - Made with Clipchamp (1)

Any suggestion of having this checker pattern always be static on top of the sprite?