A solution I found from watching your video was using gpu blendmodes, I found that using surface_set_target(surface); gpu_set_blendmode_ext_sepalpha(bm_src_alpha, bm_inv_src_alpha, bm_src_alpha, bm_one); draw_sprite(); gpu_set_blendmode(bm_normal); surface_reset_target(); worked pretty okay
found what i needed, as always. I do feel sorry for barely following and just copying the lines when I see on the video the effects i need, but i guess its better than nothing. I really felt it when you said "You can probably guess what's going to happen now". brah i have no clue. thanks again, you rock.
Thank you very much for this video. I knew about blending from working with shaders 5 years long in my job but never assumed that the game maker 2 used some tricks to the normal application surface drawing in comparison to the custom surface drawing. This cleared it up for me and now I can blend not only stuff I draw on one surface correctly but also multiple surfaces correctly with each other. Subscribed!
Unfortunately I downloaded the project and tried all of the solutions, and none of them could remove the alpha distortion drawn to my surface. So frustrating!
Thank you a lot for all your video i've learned a lot. From what i understand the method which use premultiplied alpha doesn't work if you try do draw a sprite using "draw_sprite_ext" with an alpha set below 1, am i right ?
I downloaded this project and switched the premultiplied text to an image I made myself - "version 5" doesn't work, even after checking "premultiply alpha". I was going crazy when I did a test project and I couldn't replicate your results at all. I wonder what causes this issue? Is there some new setting that has to be checked somewhere to get this working in newer versions of GM? My sprite seems to work fine with version 6 (the one with a shader). Very odd.
If I want to use the shader approach (06), should the code be in a script that every object would call in their draw event? Or what would be the most sensible way to do it in a 2d game?
Actually using a parent with the code in it seems to work ok, I'm using ds grid depth sorting so I can plug this in there too. Thanks for a great tutorial, I hope you do more in the future.
A solution I found from watching your video was using gpu blendmodes, I found that using
surface_set_target(surface);
gpu_set_blendmode_ext_sepalpha(bm_src_alpha, bm_inv_src_alpha, bm_src_alpha, bm_one);
draw_sprite();
gpu_set_blendmode(bm_normal);
surface_reset_target();
worked pretty okay
found what i needed, as always. I do feel sorry for barely following and just copying the lines when I see on the video the effects i need, but i guess its better than nothing. I really felt it when you said "You can probably guess what's going to happen now". brah i have no clue.
thanks again, you rock.
Thank you very much for this video. I knew about blending from working with shaders 5 years long in my job but never assumed that the game maker 2 used some tricks to the normal application surface drawing in comparison to the custom surface drawing.
This cleared it up for me and now I can blend not only stuff I draw on one surface correctly but also multiple surfaces correctly with each other.
Subscribed!
Excellent tutorial as always, Greg. I can't think of where I'd be able to begin when running into a problem like this.
Thank you again - appreciated :)
When using surfaces
I was really losing patience with my project, but the best decision I made was take to time to understand this video.
Thank you so much!
Thank you so much I learned a great deal from the first few minutes alone. Unlocked some more of the mystery of application surfaces as well!
Glad you like the tutorial and think it's helpful :)
Wow. This is SO helpful you don't even know!
Thank you :)
excellent teaching
Thank you :)
excellent video, is there a way to make a part of my sprite invisible? Like a region? Or am I required to create surfaces?
Oh god it worked, thank you!
Wonderful tutorial. Really helped me out
Unfortunately I downloaded the project and tried all of the solutions, and none of them could remove the alpha distortion drawn to my surface. So frustrating!
Thank you a lot for all your video i've learned a lot. From what i understand the method which use premultiplied alpha doesn't work if you try do draw a sprite using "draw_sprite_ext" with an alpha set below 1, am i right ?
I downloaded this project and switched the premultiplied text to an image I made myself - "version 5" doesn't work, even after checking "premultiply alpha". I was going crazy when I did a test project and I couldn't replicate your results at all. I wonder what causes this issue? Is there some new setting that has to be checked somewhere to get this working in newer versions of GM?
My sprite seems to work fine with version 6 (the one with a shader). Very odd.
If I want to use the shader approach (06), should the code be in a script that every object would call in their draw event? Or what would be the most sensible way to do it in a 2d game?
Actually using a parent with the code in it seems to work ok, I'm using ds grid depth sorting so I can plug this in there too. Thanks for a great tutorial, I hope you do more in the future.
Slowly scratches head.