Default animation and multiple samplers

Hey everyone,

I’ve set up a material and custom sprite shader with two samplers. I’m using the second sampler as a palette, configured as a fragment constant, and that part is working fine.

However, I’ve encountered an issue with the default animation. It seems that the default animation is being searched in all samplers. While I can see how this could be useful in some scenarios, it doesn’t make much sense for my current setup.
I’m unable to run the game without adding the animation to both samplers, but I can change it later at runtime, and it works as expected.

Is there a way to not require the animation in the “secondary” samplers?

Edit: also tested it on Defold beta 1.7.0, but got the same issue.

Thanks!

1 Like

Hi @aikelb !

Yes, in our first iteration of this feature, you need to use the same animation name in both atlases.
This was to make it possible to use e.g a diffuse and a normal atlas for a ship.

We’ve had the request to use separate animation from each atlas, but I don’t think an issue was created.
Please feel free to add a feature request on our issue tracker on Github!

Got it! Thanks!

Created: Use separate animations for each atlas when using multiple textures in a sprite · Issue #8609 · defold/defold · GitHub

4 Likes

Excellent! Thanks!