The Image Effect Giver
Re: The Image Effect Giver
It's not long term storage :/
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: The Image Effect Giver
Framebuffers/canvases will stay in VRAM all the time until they're gone, taking up space even when they aren't used, I think.
Re: The Image Effect Giver
but if you're using the same one each time its ok?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.
Re: The Image Effect Giver
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.kraftman wrote:but if you're using the same one each time its ok?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.
Re: The Image Effect Giver
But the speed of using a shader + framebuffer is 1.7 billion times faster than using mapPixel(etc)
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: The Image Effect Giver
The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
Re: The Image Effect Giver
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.
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.Jasoco wrote:The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
Re: The Image Effect Giver
Guys, back on topic plase xD?
Give me some ideas for effects
Give me some ideas for effects
Re: The Image Effect Giver
Implement convolution. Using that you can do a lot of stuff, like blur, sharpening, edge detection, corner detection, emboss, ...
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: The Image Effect Giver
What do you mean "keep a reference to them"?Rad3k wrote: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.Jasoco wrote:The point is FrameBuffers don't just disappear if not used, right? They're permanent until destroyed manually.
Who is online
Users browsing this forum: No registered users and 4 guests