glslp shaders in jitter?


    wheelersounds's icon
    wheelersounds's icon
    Nov 23 2022 | 11:22 pm
    Hi there,
    I found a wealth of glslp shaders on libretro and I want to try them in Jitter but I can't load them directly into a slab or shader object. Where can I find info on how to do this? Thank you! -Nate

    • 👽R∆J∆ The Resident ∆lien👽's icon
      👽R∆J∆ The Resident ∆lien👽's icon
      Hey Nate, that looks like fun. I looked up "GLSLP vs. GLSL" found this:
      and made sense of it like maybe Jitter wouldn't recognize the GLSLP as they're just markup-like files of setups showing what GLSL shader to actually use for what layer and what parameter settings to use for that layer.
      but when i look at an example i notice there's some params which aren't listed in the associated GLSL files...
      i look at that text and at first interpret it like maybe it means we could try this: load shader0(shaders/crt-blurPi.glsl) into one object, and then send the output of that object into a second object with shader1(shaders/crt-blurPiScanlines.glsl) loaded into it. and then, hopefully it should be as simple as sending the associated params listed below each shader the same way shown in the helpfile.
      except if you look at the line "filter_linear0 = true" and try to find a parameter in the associated shader files(shaders/crt-blurPiScanlines.glsl or shaders/crt-blurPi.glsl) that's called 'filter_linear0' you won't find it. you will find the very last two params listed in the .glslp text: blurGain = "0.20" blurRadius = "0.50" as params listed in the crt-blurPi.glsl: and that's the only thing that makes sense(so my guess is that the other params like 'filter_linear0' are specific to the larger RetroArch/libretro system?)... i dunno... but at least you could just go through the entire repo, find all the GLSL files by themselves and start getting to know those by loading them into a object individually, look at the GLSL code, find the params, send those from your outer max patch and i'm sure you'll find much to poke through that way. eventually, you might also discover how the system all blends together using the specifications of the GLSLP files(maybe 'filter_linear0' is shown in some GLSL file somewhere i'm just not seeing yet?). anyways, that's my best guess, maybe others have a better clue. hope it helps for now until someone more in-the-know comes along 🍻
    • wheelersounds's icon
      wheelersounds's icon
      Nov 24 2022 | 12:46 am
      Thank you Raja! (also hi from lines!) It seems like glslp functions sort of like jxs in jitter, so it would make sense to dig for the glsl files being referenced, and go from there. I'll take a whack at it. Really appreciate your time and energy!