what is texture2D in jit.gl.pix codebox ?
Hi everyone,
I'm almost there with converting this shader from shadertoy
https://www.shadertoy.com/view/4dXSzB#
The one part I'm stumped on is how to define a
-texture2D within jit.gl.pix codebox
I've seen from the jit.gl.pix td.repos example that texture2Drect = sample(in1, norm);
Could someone point out what I'm missing.
I've posted the patch I have which is very close to working.
I think I'm almost there.
The problem now is how to obtain a smooth "rain texture"... it seems there's some kind of antialiasing active in the shadertoy player, but I don't know how to reproduce it with Jitter.
Ok, this looks nicer:
super cool guys.
for the record, you can replace uv = cell / dim;
simply with the gen operator norm
Hi Lska,
Thanks for taking the time to do this, its made (again !) a lot clearer to me how to convert things into codebox. :)
(plus for the wiki tuts that I'm working on converting)
Have to get in my head that codebox handles things like this
vec2 where = (uv.xy-raintex.xy);
to this
where = uv-raintex;
So in codebox is there no "real" difference between texture2D and texture2Drect ???
I think that the 1 plane 2d texture is just probably a high resolution image. If i put the dim setting on the jit.bfg to 256 256 I get a pretty smooth rain effect.
Thanks a million !
You already have it -- sample().
I think the trick was that you didn't need the vec() wrapper in assigning to "where". This looks pretty similar to me:
Thanks everyone !