Page 5 of 33

Re: Share a Shader!

Posted: Sat Nov 26, 2011 9:56 pm
by RPG
Information for consideration. You do not allow the programmer to modify the vertex shader, but the video card uses vertex and pixel processors separately (for video cards without unified shader processors). That means you can do some calculations on the vertex processor instead pixel processor to maximize performance of pixel effect.

In my shaders I use vertex processor too, and performance of effects was increased. For huge algorithms difference is noticeable (at least 10%).

I hope LOVE will have support of "raw" GLSL shaders.

Re: Share a Shader!

Posted: Sat Nov 26, 2011 10:07 pm
by slime
I have been pushing for a vertex shader API as well, but bartbes says they'll wait and see if regular pixeleffects are popular or something.

Re: Share a Shader!

Posted: Sat Nov 26, 2011 10:30 pm
by RPG
For example, lighting. You use in game bumpmapping, parallax and so on. Some vector computation may be done in vertex shader: light and mouse coordinates, normals.

Re: Share a Shader!

Posted: Sat Nov 26, 2011 11:25 pm
by slime
RPG wrote:For example, lighting. You use in game bumpmapping, parallax and so on. Some vector computation may be done in vertex shader: light and mouse coordinates, normals.
In 2d games with bump mapping you don't need vertex normals and you can use a regular rotation matrix instead of a TBN matrix, so you won't gain as much benefit from a vertex shader as you would in a 3D game, but it still helps a lot.

Re: Share a Shader!

Posted: Tue Feb 07, 2012 4:12 pm
by SiENcE
I ported another sample from the glsl site like vrld did.

If someone can share a shader wich transforms textures/images i would appreciate this very much!

here is is.

Re: Share a Shader!

Posted: Tue Feb 07, 2012 6:13 pm
by veethree
How could one acquire a copy of whatever you guys are using to run these things? Last i checked 0.8.0 isn't out. lol

Re: Share a Shader!

Posted: Tue Feb 07, 2012 6:45 pm
by tentus
veethree wrote:How could one acquire a copy of whatever you guys are using to run these things? Last i checked 0.8.0 isn't out. lol
https://love2d.org/builds/

Re: Share a Shader!

Posted: Tue Feb 07, 2012 10:37 pm
by vrld
SiENcE wrote:transforms textures/images
Transforms in what way?

For classic image processing effects, see these posts:
Images Effects -shader.love
ringfire shader.love
blurshader.love
bloom
HSL <-> RGB

For distortion, see these:
turn a square image into a rotating sphere (5th code box)
caleidoscope.love

Re: Share a Shader!

Posted: Tue Feb 07, 2012 11:39 pm
by SiENcE
vrld wrote:
SiENcE wrote:transforms textures/images
Transforms in what way?
3D projection

Re: Share a Shader!

Posted: Wed Feb 08, 2012 4:56 am
by utunnels
Dang, it says my graphics card does not support pixel effect. :|