SOLVED how to display colormixing particles

JML

Wabbajackalope
I am trying to use surfaces and 'phy_particle_flag_colourmixing'

i dont always know what colour will appear when the mixing occurs, thus i would like to remove all colours on the surface below a certain alpha, but the only way i can seem to remove is using draw_clear_alpha

is their a way to either remove all previous colours on the surface and having it drawn from the beginning or remove all colours below a certain alpha?

Thank you
 

TsukaYuriko

☄️
Forum Staff
Moderator
Is using draw_clear_alpha not sufficient for this? If so, what's the reason behind that? That function is meant to be used to remove everything because it outright overwrites the contents without doing any blending, so if that's what you're after, this is the function to use.

You can also outright disable drawing any pixels below a particular alpha threshold via gpu_set_alphatestref. Is this what you're looking for?
 

JML

Wabbajackalope
@TsukaYuriko

the problem is that i want to remove all colours based on alpha, not just one specific colour.

if i try to remove just one colour and use phy_particle_flag_colourmixing then the mixed colours are not removed causing the colour of the objects to be distorted when they are drawn.

here i will post the code im using. one sec.
 

JML

Wabbajackalope
Found the solution, rather than using draw_clear_alpha you need to go to the blendmode you need to use the advance blend mode

gpu_set_blendmode_ext(bm_src_alpha_sat, bm_one);
 
Last edited:
Top