Stencils + Alpha ?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
kalium
Prole
Posts: 9
Joined: Fri Jul 06, 2012 6:36 pm
Location: Rio de Janeiro

Stencils + Alpha ?

Post by kalium »

So, I'm making a game that depends very much on stencils. I have 2 layers on the map that are drawn using the same stencil (one with the stencil normally, and the other with the stencil inverted).
The thing is, I want to make the transition borders between these two layers to be smoother, as if one is fading out into the other. The stencils are circle-shaped, and I need to make its alpha fade out gradually as it approaches the borders of the circle.

Is there any way to make this effect using stencils or other functions in Love2D?
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Stencils + Alpha ?

Post by Ref »

pixelEffect or if frame rate not a concern mapPixel can do what you want.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 9 guests