[sharingmakesmesleepy]time warp

Sep 18, 2007 at 12:08am

[sharingmakesmesleepy]time warp

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.

#33718
Sep 18, 2007 at 2:09am

web forum love?

#112680
Sep 18, 2007 at 4:45am

Sorry again…
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.

AB

#112681
Sep 18, 2007 at 5:46am

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?

thanks again.
-rob

#112682
Sep 18, 2007 at 5:55am

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.

wes

#112683
Sep 18, 2007 at 6:01am

> 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?
>
>
Hi Rob,
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.

Andrew B.

#112684
Sep 18, 2007 at 6:02am

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.

#112685
Sep 18, 2007 at 2:14pm

I’m getting a bogus object: jit.gl.slab.gauss6x foo
What is the intention there? not quite sure what I should substitute!

#112686
Sep 18, 2007 at 3:08pm

Hi Peter,
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.

Andrew

#112687
Apr 15, 2008 at 1:31am

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.

Thanks,
Keith
On Mon, Sep 17, 2007 at 7:08 PM, andrew benson
wrote:

> 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.
>
>
>
>

#112688
Aug 22, 2011 at 6:11pm

Is it possible to know where i can find the patch? thanks in advance :)

#112689
Aug 26, 2011 at 6:57am

wouldn’t it be this ?

Attachments:
  1. timewarp.zip
#112690
Oct 19, 2011 at 10:19pm

thanks! :)

#112691

You must be logged in to reply to this topic.