Y
yoyowan
Guest
Trying to blend colours of simple shapes like this :
// set colour
colour1 = make_colour_rgb(0,255,255); // cyan
colour2 = make_colour_rgb(255,255,0); // yellow
// draw circle 1 cyan (I would prefer blue)
gpu_set_blendmode_ext(bm_dest_colour,bm_zero);
draw_circle_colour(x,y,global.size_b,colour1,colour1,false);
gpu_set_blendmode(bm_normal);
// draw circle 2 yellow
gpu_set_blendmode_ext(bm_dest_colour,bm_zero);
draw_circle_colour(x,y,global.size_b,colour2,colour2,false);
gpu_set_blendmode(bm_normal);
Here when I blend the two circles : cyan + yellow = green (what I am looking for)
BUT it is not working as paint blend with other colours...
I would like to have a unique method to have the blends dealing with paint that is :
blue (not cyan) + yellow = green
red + blue = purple
red + yellow = orange
white or black background
thanks for helping me finding a neat solution to this problem
(I have taken some time on gpu_set_blendmode_ext function and this excellent article https://www.yoyogames.com/blog/57/explaining-blend-modes-part-2 but my conclusion is that it is not possible this way...)
// set colour
colour1 = make_colour_rgb(0,255,255); // cyan
colour2 = make_colour_rgb(255,255,0); // yellow
// draw circle 1 cyan (I would prefer blue)
gpu_set_blendmode_ext(bm_dest_colour,bm_zero);
draw_circle_colour(x,y,global.size_b,colour1,colour1,false);
gpu_set_blendmode(bm_normal);
// draw circle 2 yellow
gpu_set_blendmode_ext(bm_dest_colour,bm_zero);
draw_circle_colour(x,y,global.size_b,colour2,colour2,false);
gpu_set_blendmode(bm_normal);
Here when I blend the two circles : cyan + yellow = green (what I am looking for)
BUT it is not working as paint blend with other colours...
I would like to have a unique method to have the blends dealing with paint that is :
blue (not cyan) + yellow = green
red + blue = purple
red + yellow = orange
white or black background
thanks for helping me finding a neat solution to this problem
(I have taken some time on gpu_set_blendmode_ext function and this excellent article https://www.yoyogames.com/blog/57/explaining-blend-modes-part-2 but my conclusion is that it is not possible this way...)
Last edited by a moderator: