I have the following process:
- draw background - draw objects and blend with background (1)GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA - draw particle effect with blending (2)GL10.GL_SRC_ALPHA, GL10.GL_ONE in order to highlight overlapping particles
The problem is when I draw a particle, they additionally mix with the background and become very bright.
I just need to mix the particles with (2) and all together to mix with the background using (1).
Broken solutions:
- The effect of drawing a texture and applying it works fine ... but very slowly.
- Drawing the particle effect first, and not the background, it looks fine ... but I can't draw the scene object, and not because they should be between bg and the effect.
Here is a screen to show the difference. On the desired desired result, the left particles are mixed with the background.
img:

I would be grateful for any help ...
Recent updates: I managed to get the color that I want ... but ... (It seems that this will not move me anywhere) I provided the background with alpha = 0 and used the blend Function function from GL11Ext: glBlendFuncSeparate (GL10.GL_SRC_ALPHA, GL10. GL_DST_ALPHA, GL10.GL_ONE, GL10.GL_ONE);
GL10.GL_SRC_ALPHA, GL10.GL_DST_ALPHA - colors mix only if they have alpha (now no bg)
GL10.GL_ONE, GL10.GL_ONE - for maximum values ββfor all recorded particles for additive mixing modeling

It works fine, as you can see ... except for the black fill area, where the particle image has alpha 0 .. and what's bad is that the resulting image has black that has alpha 1, so I canβt do it in any way replace ...
EDIT_2 A common problem in simple words: I need to draw a red (0xff0000) glowing (additive blending effect). On a black background this is normal, but if I took green (0x00ff00), than the color of the result would be close to 0xffff00
Any ideas?
Yuriy
source share