Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411432 Posts in 69363 Topics- by 58417 Members - Latest Member: gigig987

April 20, 2024, 05:20:35 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Invert colour with a feathered circle?
Pages: [1]
Print
Author Topic: Invert colour with a feathered circle?  (Read 483 times)
afender7
Level 0
***


twitter.com/afender7


View Profile WWW
« on: August 03, 2015, 06:10:53 AM »

Hey guys, I currently have an effect where there are certain objects that move around that have a circle following them which inverts the colours of everything inside it.

Currently, I'm using an object with -9999 depth that follows the main object around and draws the inverted circle like this:

Code:
draw_set_blend_mode_ext(bm_inv_dest_colour,bm_inv_src_colour);
draw_set_color(c_white);
draw_set_circle_precision(64);
draw_circle(x,y,256,false);

draw_set_blend_mode(bm_normal);

This works fine, however when I try to use a sprite that is a white circle that is feathered heavily it just ignores the alpha value of the sprite entirely, i.e. if the alpha value of a pixel is >1 it inverts the colours fully rather than partially. My question is whether it's possible to have this inverted colour effect apply at alpha values less than 1? I've tried manually drawing circles with varying alpha values too, and this produces the same effect.

I hope that made sense. Thanks in advance.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic