Share a Shader!

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
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Share a Shader!

Post 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.
User avatar
slime
Solid Snayke
Posts: 3161
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Share a Shader!

Post 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.
User avatar
RPG
Party member
Posts: 157
Joined: Wed Mar 02, 2011 5:02 am
Location: Russia
Contact:

Re: Share a Shader!

Post 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.
User avatar
slime
Solid Snayke
Posts: 3161
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Share a Shader!

Post 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.
User avatar
SiENcE
Party member
Posts: 804
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Share a Shader!

Post 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.
Attachments
tunnel.love
(1.15 KiB) Downloaded 910 times
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Share a Shader!

Post 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
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Share a Shader!

Post 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/
Kurosuke needs beta testers
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Share a Shader!

Post 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
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
SiENcE
Party member
Posts: 804
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Share a Shader!

Post by SiENcE »

vrld wrote:
SiENcE wrote:transforms textures/images
Transforms in what way?
3D projection
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Share a Shader!

Post by utunnels »

Dang, it says my graphics card does not support pixel effect. :|
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests