Page 2 of 2
Re: Shader implementation in LÖVE and resources to study (+ shockwave and swirl shader attached)
Posted: Fri Aug 04, 2023 5:47 am
by Rigachupe
Neat shader. I like it. Where is the thumbsup?
Re: Shader implementation in LÖVE and resources to study (+ shockwave and swirl shader attached)
Posted: Sat Aug 12, 2023 3:46 pm
by tourgen
I agree. It's a good introduction to shaders in the context of Love2D. A great starting place.
I've been using #pragama language glsl3, but I'm about to start writing GLSL ES with Love2D for this Dragon tablet (android) I have laying around and I wonder how much I will have to change because, for example, I used Texture2D() instead of the Love2D shader function name.
Re: Shader implementation in LÖVE and resources to study (+ shockwave and swirl shader attached)
Posted: Sat Aug 12, 2023 6:56 pm
by slime
texture2D() is not a valid function in GLSL 3, on desktop or on phones. The equivalent would be
texture() (which also supports many different sampler types as inputs instead of just 2D ones).
love's Texel() function always works no matter the version, since it picks whether to use texture() or texture2D() depending on the active version.
love's shader entry point functions (vec4 effect, etc.) are the same no matter the version. GLSL 3 allows you to use some shader entry point functions that aren't available in GLSL 1.