Unsorted transparency

Is there any way to have transparent objects rendered last (i.e. as per Bucket.Transparent) but not sorted amongst themselves?

I’ve got some glows that are all rendered as AlphaAdditive so it actually makes no difference what order they are rendered in (addition being commutative).

If I could render the glow without writing to the z buffer then I could just blat them out in any order and the end result would be the same. It’s not a huge deal as I’m only expecting to have 4 or 5 of these on screen at one time but just in case I end up using it more heavily I’d like to avoid the constant resorting.



Use a own geometry Comparter / sorter

@EmpirePhoenix said:
Use a own geometry Comparter / sorter

Wouldn't that still do the sort process though even if I defined my own comparator? The entire sort operation could be skipped for these objects.

Although now I think about it if there was even one normal blend but partially transparent object in the scene the AlphaAdditive objects should still be sorted against that so I guess unless I end up with ridiculous numbers of them it's not worth worrying about.

Well there is always a sort process, it would just replace it with your needed logic.

Yeeh, that’s the thing. Unless I’ve missed something AlphaAdditive rendering doesn’t need a sort process at all. They just need to look at the z buffer for the last non-transparent object rendered and then either draw or not depending on whether they are in front of it. If you have 3 AA objects overlapping then the result is identical no matter what order they are drawn in.

However if you inserted a semi-transparent window in between those objects that would change things as while the order of the AA objects doesn’t matter their order with respect to the window would.

There should always be a sort even if it’s only sorting by material to avoid excessive state changes.