I am making a card game, and I’m working on creating a dissolve effect for the cards.
The cards are prefabs that have multiple Images that are pieced together to create the whole card (background, main-art, text-background, frame, etc).
For the dissolve effect, what I’m working towards doing is setting it up so that the effect has the card dissolve ‘as a whole’ (meaning the ‘noise’ for the dissolve effect is sampled in some sort of “space” that each of the Images can use to make it look correct). I’m doing this by applying a material to each of the Images, and then sending in some shader parameters to each one (card centerpoint & card scale).
I’m using a Canvas Shader Graph (the dissolve effect is a sub graph). This is how I am sampling the noise node:
So what I am doing is:
- Getting the World Space position
- Subtracting the position of the centerpoint of the card prefab (which is a parameter that is passed into the shader. I am sending in the cardPrefab.transform.position for this). This gives me the ‘position relative to the centerpoint of the card’
- Then I divide by the scale of the card (which is a parameter that is passed into the shader. I am sending in the cardPrefab.transform.lossyScale for this).
- Sample the noise
In my scene I have two cards, one has its transform’s scale set to 4, and the other one has its transform’s scale set to 8.
In Scene view they look correct. The bigger card should just look like a bigger version of the smaller card:
But in Game view, the bigger card looks different than the smaller card (something is wrong with how the noise being sampled):
Here is a video showing the problem - I adjust the scale in Scene view and it looks correct, but then I adjust it in Game view and its wrong:
Also just to show this - moving the cards around does properly move the effect ‘along with the card’, so that part is working:
I feel like the problem has something to do with trying to use the World space position with a UI Canvas shader, or maybe a mismatch between using the world-positions and the cardPrefab.transform scale? I’ve tried playing around with trying different “spaces” for the position but haven’t found one that works. I feel like there isn’t much info on how the “spaces” work with the Canvas Shader Graph since its relatively new (2023?).
Would really appreciate any help with this or suggestions on what to try.
Thanks a lot!



