maxim wrote:Ok, thanks for the explanation.Toti wrote:maxim wrote:You don't mean negative numbers here to you?
I just proposed to (mis)use the sign as a flag for emissive/nonemissive drawn blobs - and be stripped off before handing over the value to OGL functions.
No, it's just that we are using additive blending which gives a nicer look and avoids the need to sort objects from back to front prior to render them.
Given this additive form, rendering another blob always increases brightness and never decreases it, no matter how dark it is.
There are possibly some ways to circunvent this without changing the blending function for bright blobs, being one of them to split the template into an emissive part and an absorptive one, but this could bring newer blending artifacts where the objects merge, etc.
But how would you avoid the problem by creating two parts for merging? There wouldn't be any depth information available. Rotating the result would look quite funny.
Yes, this is precisely the problem I alluded to: you can sort both objects according to the distance to their centers, but in the part they overlap/merge it will be quite messy.