In the spirit of sharing wacky shader ephemera that has been circulating
of late, here is a little sketch I’ve made of doing time-warping using a
3D texture and shader. Unfortunately, there is no feature currently
exposed in Jitter to update a single slice of a 3D texture, so loading
the texture to GPU is gonna be suuuuuuuper sloooooww, but once it’s
there should be ready to do the goo dance in fast motion.
web forum love?
For some reason I keep forgetting about the attachment limitations. Here is the ZIP again, this time attached using the web-forum. I’ll try to remember next time, I promise.
ha ha! i knew you loved us.
great example of use of 3d textures. i iz learning slowly.
quick question. in gridshape you specify two values for the texture attribute, the two gl.texture names.
how do you distinguish between the two in the shader?
i know in this case, one is 2drect and one is 3d, but what if you had two textures of the same dimension. how does the shader know which is which?
Determining which texture gets where in a shader isn’t discriminated
by type. You can bind one type to a different sampler and things will
just go blank. It’s done my the uniform’s name and which texture unit
it’s assigned to. In Jitter, this is handled by giving it a default
int value :
if you have jit.gl.gridshape foo @texture zebra monkey, zebra will be
texo and monkey will be texa.
> how do you distinguish between the two in the shader?
> i know in this case, one is 2drect and one is 3d, but what if you had two textures of the same dimension. how does the shader know which is which?
The @texture can have multiple arguments, which allows one to do
multi-texturing. Within the shader .jxs file, you may notice that the 2
textures are bound as "int" params, with the values 0 and 1
respectively. The first argument to the @texture is texture 0, and the
second is texture 1. These are then referred to within the shader as
sampler__ types with the name given in the param binding XML code.
so based on the left to right order of the attribute values, which corresponds to the default value you set in the jxf?
[gridshape foo @texture texone textwo texthree]
in this case texone is texo, textwo is texa and texthree is texb.
works for me. thanks for the clarification.
I’m getting a bogus object: jit.gl.slab.gauss6x foo
What is the intention there? not quite sure what I should substitute!
This is an abstraction that lives in the
/examples/jitter-examples/render/slab folder. You probably removed the
examples folder from your search path. The purpose of this abstraction
is to perform a smooth gaussian blur on the map texture so that the time
warp is smooth and interpolated.
Time warp has always worked on computer just fine, but now I’m trying to use
it on another computer and I’m getting:
jit.gl.render: building GL on window "zzzz"…
jit.gl.texture: error submitting texture data: GL Error: Invalid value
Then if I resend the 3d matrix to the slop texture I get:
jit.gl.texture: setting teximage during submission.: GL Error: Invalid value
This computer is a 2GHz Macbook with 2GB of RAM. GMA X3100 with 144MB of
VRAM. 10.5.1 Max 4.6.3 Jitter 1.6.3
Any help with this would be really great.
On Mon, Sep 17, 2007 at 7:08 PM, andrew benson
> Hi Guys,
> In the spirit of sharing wacky shader ephemera that has been circulating
> of late, here is a little sketch I’ve made of doing time-warping using a 3D
> texture and shader. Unfortunately, there is no feature currently exposed in
> Jitter to update a single slice of a 3D texture, so loading the texture to
> GPU is gonna be suuuuuuuper sloooooww, but once it’s there should be ready
> to do the goo dance in fast motion.
> Happy patching.
> Andrew B.
Is it possible to know where i can find the patch? thanks in advance :)