foriero написалGreat. Does it mean that in Linear Space the PMA textures with additive attachments won't produce extra draw calls?
You should still use Straight Alpha Textures when in Linear color space, you should just enable Advanced - PMA Vertex Colors
at the SkeletonAnimation
component. PMA Vertex Colors
is what allows additive Slots to work in a single draw call (the Additive slot info is passed to the shader via the PMA vertex color). Actually the Premultiply alpha
atlas textures mainly improve mipmap generation in Gamma space (but ruin it in Linear space), and would allow for texture-based additive blending if you edit the texture after it has been exported from Spine (paint the alpha channel black where you want it to be additive, which is rarely done by anyone).
I'm afraid PMA atlas textures in Linear space are not something that we can fix easily.
I'm sorry that these things can be very confusing. Once the shader updates are done, I will update the spine-unity docs pages so that they hopefully explain things in a clearer way.
foriero написалThe issue with the mushroom is that we have six additive attachments there each producing an extra drawcall.
For 6 additive attachments you have successfully chosen the worst possible draw order 😉.
If you could change the draw order in a way that it's not interleaved as much, you could reduce draw calls of course (e.g. Additive back attachments
, Normal attachments
, Additive front attachments
would take 3 draw calls instead of 11), don't know if that's feasible with your art though.
foriero написалIf six mushrooms producing sixty drawcalls then linear space is out of question.
Gamma space will most likely provide for an easier setup with fewer pitfalls. It depends on whether you really want (or need) linear blending and linear lighting gradients, which will also be a question of art style and the result that you want to achieve. Linear space will provide for better post processing effects though, so it might be worth the hassle. Anyway, we will do our best to improve the shaders as much as possible so that you can use Linear space with ease 🙂.