Is it possible to disable the shading language?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
ninjacharlie
Prole
Posts: 5
Joined: Sat Jan 11, 2014 4:33 pm
Location: IN SPAAACCEEE
Contact:

Is it possible to disable the shading language?

Post by ninjacharlie »

I was wondering if it was possible to use the GLSL lanaguage instead of the built in shading language for shaders. Is there something in the source code I could change? Is there an option to change when building? Or is it even possible for love to send the image to a separate program where the shader is drawn, then draw it back to the love2d window?
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Is it possible to disable the shading language?

Post by vrld »

Yes, but the 'shader language' is just GLSL with some defaults and text replacements anyway - see the wiki for a short overview. If you want to dig deeper, have a look at the sourcecode of graphics.lua. If you just want to ditch what löve is doing altogether, you can overwrite the function love.graphics._shaderCodeToGLSL(arg1, arg2) to do no code transformation. But why would you want to do this anyway?
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
ninjacharlie
Prole
Posts: 5
Joined: Sat Jan 11, 2014 4:33 pm
Location: IN SPAAACCEEE
Contact:

Re: Is it possible to disable the shading language?

Post by ninjacharlie »

@vrld, thanks. I'll look into that. The main reason I didn't want to use the built in shading language is because I found it hard to do separate passes for a shader without doing a lot of work with drawing to separate canvases. Also, I think it'll be a little easier to not have to translate shader examples from GLSL to the love2d shading language.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests