The Image Effect Giver

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Ancurio
Prole
Posts: 5
Joined: Sat Sep 03, 2011 11:20 am
Location: Germany

Re: The Image Effect Giver

Post by Ancurio »

kraftman wrote:I've started converting your code to use shaders just to see how much quicker it'd be.
There's only a couple atm, I'll add a few more later.

Obviously this needs 0.8+ to run
Wow, this speed is awesome! Just cloned the latest 0.8 source and built it just to test this,
I'm speechless..

btw., reading the changelog, I didn't see any mention of "shaders", were they already added earlier or are
they simply known under a different name?
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 »

but when we have shaders what is then the use of Imagedata:MapPixel(function)?
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: The Image Effect Giver

Post by thelinx »

Ancurio wrote: btw., reading the changelog, I didn't see any mention of "shaders", were they already added earlier or are
they simply known under a different name?
The LÖVEly name for them is "PixelEffects"
GijsB wrote:but when we have shaders what is then the use of Imagedata:MapPixel(function)?
mapPixel can still be used for one-time image modification, or generating data from an image (tiled maps using an image for reference, like Notch likes to do things)

Also, not all platforms support PixelEffects.
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 »

thelinx wrote: mapPixel can still be used for one-time image modification, or generating data from an image (tiled maps using an image for reference, like Notch likes to do things)

Also, not all platforms support PixelEffects.
But for that we have Qauds..
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: The Image Effect Giver

Post by thelinx »

GijsB wrote:
thelinx wrote: mapPixel can still be used for one-time image modification, or generating data from an image (tiled maps using an image for reference, like Notch likes to do things)

Also, not all platforms support PixelEffects.
But for that we have Qauds..
No, I mean making an image to show where tiles are located, then loading that image and putting the data in a table.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: The Image Effect Giver

Post by kraftman »

GijsB wrote:but when we have shaders what is then the use of Imagedata:MapPixel(function)?

Shaders are fast and so are useful for applying effects per frame, but kind of overkill for one-off changes to an image.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: The Image Effect Giver

Post by miko »

GijsB wrote:but when we have shaders what is then the use of Imagedata:MapPixel(function)?
If I am not mistaken, output of the shaders goes directly to the screen, you can not save your modified image. With :MapPixel() you can.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: The Image Effect Giver

Post by kraftman »

miko wrote:
GijsB wrote:but when we have shaders what is then the use of Imagedata:MapPixel(function)?
If I am not mistaken, output of the shaders goes directly to the screen, you can not save your modified image. With :MapPixel() you can.
You can draw to a Canvas/Framebuffer with a shader though.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: The Image Effect Giver

Post by The Burrito »

mapPixel pretty much works on all computers, shaders and framebuffers do not (although usually framebuffers just have nonPo2 issues).
kraftman wrote:
miko wrote:
GijsB wrote:but when we have shaders what is then the use of Imagedata:MapPixel(function)?
If I am not mistaken, output of the shaders goes directly to the screen, you can not save your modified image. With :MapPixel() you can.
You can draw to a Canvas/Framebuffer with a shader though.
framebuffers are not really intended for long term storage, I would definitely avoid using them for calculate once kind of things, especially if you need to make a lot of them.
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 Burrito wrote:framebuffers are not really intended for long term storage, I would definitely avoid using them for calculate once kind of things, especially if you need to make a lot of them.
Explain.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests