samplerJit0...N and textureJit0...N documentation?
Hello,
I came across the use of samplerJit0
in the shader code for example patch tb.pl.disco.duck.maxpat
and textureJit0
in a couple shaders online.
I've not had any luck finding any information about them, although I suspect they may have to do with texture buffers.
I'm wondering what they are and how to use them. Is there any extant documentation? Have they been superseded by something else? (The Texture Buffers guide seems to be equivalently using samplerBuffer
and texelFetch.
)
Thanks for your help!
Tristan
Hi Tristan,
samplerJit0...N is a sampler kind that adapts to the @rectangle state of the input texture (it can either become a sampler2D or a sampler2DRect automatically).
It's used mostly in auto-generated shaders.
If you want to use it, the only difference user-side is that you must declare the input uniforms as follows:
//With typical samplers
uniform sampler2D my1stTex, my2ndTex, ..., myNthTex;
//With samplerJit
uniform samplerJit0 my1stTex;
uniform samplerJit1 my2ndTex;
...
uniform samplerJitN myNthTex;
Hey Matteo,
Perfect, thanks for explaining!
Tristan