Forums > Jitter

jit.gl.sketch and shaders

August 4, 2008 | 4:33 pm

I dont have much experience with shaders but is it possible to apply a shader to a jit.gl.sketch object. All of my attempts have caused my video textured plane to turn black. From what I have found in the tutorials and help files shaders have only applied to jit.gl.gridshape. Perhaps there is a special glcommand needed? Thanks.


August 4, 2008 | 5:53 pm


August 6, 2008 | 4:39 pm

"most other shaders are intended to be used with a texture and have the texture applied to the 3D geometry"

this is exactly what i am going for…I’m using jit.gl.sketch to create twelve planes and then i am applying a separate texture to each of those planes. What i would like to do is blur the textures that are already mapped onto the planes. I tried using the convolution.cf.blur.jxs shader. Any ideas?


August 6, 2008 | 4:45 pm

post a patch


August 6, 2008 | 5:25 pm

here you go


August 6, 2008 | 6:01 pm

you have some options. but the main idea is that you need some gl.slabs in the patch. slab is *basically* a gl.texture and a gl.shader.

you can either, capture the entire gl.sketch to a gl.texture (with the @capture attribute) send that texture through a slab with a blur shader, and then to a videoplane. i’ve posted some recent examples on how to do this. this seems like what you want to do, and it’s the easiest to implement.

or you can create separate gl.texture object for each of your planes. the poly~ object can be helpful. then you apply a shader to that texture. then you apply that texture to each plane.

or you can use gl.lua and use the glbindshader command.

in any case, you want the shader to perform it’s work on the gl.texture, not the gl.sketch geometry.


December 10, 2009 | 10:04 pm

I wish I could get the attachements because that is exactly the difficulties I am having.


Viewing 7 posts - 1 through 7 (of 7 total)