Jitter-Lua 3dTexture read / write problem
We are trying to get 3d textures in Lua but we have no success.
There is an example file attached with a Lua script and two shaders (one is writing to texture and the other one is reading the texture).
The output should be red. Sure I'm missing something obvious...
Any help will be much appreciated!!
Thanks
I've noticed that if you turn high_res in jit.gl.world on/off the result is as expected (red)...
No clue what's going on.
Oh.. and we are on win10 btw
Just in case someone wants to test this on apple. Here is an opengl 120 version .
hi Luca.
i'm sorry to say, but Jitter does not support capturing to a 3D texture. currently, the only way to write to a 3D texture is via matrix input.
Thanks Rob, but thats a bummer.
I can't really understand why this isnt implemented. I mean, if c74 include the read functionallity for 3d Textures, why not also the write function? We are talking about a few more lines of code here...
Hi Rob! Is it possible to generate a texture (maybe with jit.gl.pix) and convert it to an image? And then use the image as input for a jit.gl.cubemap? Thanks in advance!
sure, you can either readback to matrix by sending the texture to a jit.matrix object, or using jit.gl.asyncread. depends on your specific needs what will work better for you.