The Image Effect Giver

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: The Image Effect Giver

Post by kraftman »

It's not long term storage :/
User avatar
slime
Solid Snayke
Posts: 3170
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: The Image Effect Giver

Post by slime »

Framebuffers/canvases will stay in VRAM all the time until they're gone, taking up space even when they aren't used, I think.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: The Image Effect Giver

Post by kraftman »

slime wrote:Framebuffers/canvases will stay in VRAM all the time until they're gone, taking up space even when they aren't used, I think.
but if you're using the same one each time its ok?
Rad3k
Citizen
Posts: 69
Joined: Mon Aug 08, 2011 12:28 pm

Re: The Image Effect Giver

Post by Rad3k »

kraftman wrote:
slime wrote:Framebuffers/canvases will stay in VRAM all the time until they're gone, taking up space even when they aren't used, I think.
but if you're using the same one each time its ok?
AFAIK, with hardware accelerated graphics, moving things between regular RAM and VRAM is a relatively expensive operation. So if you keep frequently used sprites (or textures) in VRAM, then you actually get a speed benefit.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: The Image Effect Giver

Post by kraftman »

But the speed of using a shader + framebuffer is 1.7 billion times faster than using mapPixel(etc)
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: The Image Effect Giver

Post by Jasoco »

The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
Rad3k
Citizen
Posts: 69
Joined: Mon Aug 08, 2011 12:28 pm

Re: The Image Effect Giver

Post by Rad3k »

You can save framebuffer's contents back to imagedata (with :getImageData), so I don't see why framebuffers (combined with shaders) couldn't (or shouldn't) be used for image effects, if this would speed up calculations. But, like The Burrito pointed out, you can't rely on them working on every computer, so it's always good to have a fallback using :MapPixel.
Jasoco wrote:The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
If you keep a reference to them, then probably yes. If not, then I think Löve should automatically free them when they're garbage-collected.
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: The Image Effect Giver

Post by GijsB »

Guys, back on topic plase xD?
Give me some ideas for effects :D
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: The Image Effect Giver

Post by vrld »

Implement convolution. Using that you can do a lot of stuff, like blur, sharpening, edge detection, corner detection, emboss, ...
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: The Image Effect Giver

Post by Jasoco »

Rad3k wrote:
Jasoco wrote:The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
If you keep a reference to them, then probably yes. If not, then I think Löve should automatically free them when they're garbage-collected.
What do you mean "keep a reference to them"?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests