Allow customizing the blend function #227
Labels
A - components
Change related to an ECS component
A - internal
Internal change on a core system
C - enhancement
New feature or request
Describe the solution you'd like
bevy_hanabi
currently uses standard non-premultiplied alpha blending to draw all particles. It would be nice if that blend function was configurable instead of being hard-coded.Describe why you want that solution. Is this related to a problem?
I'm rendering my scene onto a transparent canvas, which is then blended onto the window. For that to look right, transparent objects need to use premultiplied alpha blending.
Describe alternatives you've considered
Deal with the graphical artifacts. This is what I'm doing now.
Additional context
Here's a smoke effect with my current setup. Above the line, the particles get drawn onto the transparent canvas, below the line, they get drawn onto an opaque sprite. There's a clearly visible seam in the particles that shouldn't be there.
I see that hanabi already supports alpha masking, and bevy's PBR pipeline supports alpha masking via the material's
AlphaMode
. Perhaps that type could be reused here?The text was updated successfully, but these errors were encountered: