Windows Help with Blending Mode

L

lord_berto

Guest
I need help with creating a vignette on my gui layer.

I have a sprite and it starts off white and goes to black.

I cannot seem to make the black transparent. help?
 
Can you post the sprite? Also can you post all of your related code? I saw your tags include surfaces. Does your code include surfaces?

I'm taking a guess here on how you are doing it but are you sure you even need blend modes for what you want? Couldn't you just draw a sprite or background on top of everything?
 

GMWolf

aka fel666
Easiest way to to have a sprite be black where you want to darken, and white where you want it to stay the same. Then use draw_set_blend_mode_ext(bm_dest_color, bm_zero); as a blend mode.

This is Essentially bm_multiply.
 
Easiest way to to have a sprite be black where you want to darken, and white where you want it to stay the same. Then use draw_set_blend_mode_ext(bm_dest_color, bm_zero); as a blend mode.

This is Essentially bm_multiply.
Wouldn't be easier to use black where you want to darken and transparent black where you want to stay the same and just draw it with default blend?
 

GMWolf

aka fel666
Wouldn't be easier to use black where you want to darken and transparent black where you want to stay the same and just draw it with default blend?
No. Because this will crush the colours, and generally looks way worse.
Well, yes, it's easier but won't give the intended effect.
 
Top