Ghosting With Shaders

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
Puzzlem00n
Party member
Posts: 171
Joined: Fri Apr 06, 2012 8:49 pm
Contact:

Ghosting With Shaders

Post by Puzzlem00n »

Hey, haven't been on here in a while, huh? Well, I'll get right to the question. You see this thread here?
viewtopic.php?f=4&t=2393&p=25806&hilit= ... %2A#p25806
Well, I basically want to do the same thing he does, but that thread was from the before time, where shaders didn't exist yet! So, is there any way to make this simple ghosting with shaders? I've been looking around for an hour and I can't seem to find anything. Thanks in advance!
I LÖVE, therefore I am.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Ghosting With Shaders

Post by bartbes »

You really don't need (or want!) shaders, you'll just want to use a canvas.
Every frame you draw a mostly-transparent rectangle with the background color over your canvas, and then draw the new scene over it, that should give you a nice fading ghost.
User avatar
Puzzlem00n
Party member
Posts: 171
Joined: Fri Apr 06, 2012 8:49 pm
Contact:

Re: Ghosting With Shaders

Post by Puzzlem00n »

Alright, if you say so! I'll give that a try!
I LÖVE, therefore I am.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: Ghosting With Shaders

Post by TechnoCat »

bartbes wrote:You really don't need (or want!) shaders, you'll just want to use a canvas.
Every frame you draw a mostly-transparent rectangle with the background color over your canvas, and then draw the new scene over it, that should give you a nice fading ghost.
I had double/triple buffering problems with this method a while back.

https://bitbucket.org/rude/love/issue/1 ... ear-breaks
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Ghosting With Shaders

Post by bartbes »

You weren't using canvases, TechnoCat.
Post Reply

Who is online

Users browsing this forum: Connorses and 216 guests