Page 1 of 1

Is it possible to disable the shading language?

Posted: Fri Feb 07, 2014 9:32 pm
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?

Re: Is it possible to disable the shading language?

Posted: Sat Feb 08, 2014 1:19 pm
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?

Re: Is it possible to disable the shading language?

Posted: Sat Feb 08, 2014 2:32 pm
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.