TextureInfo multi-texture question

Started by AeroShark333, April 04, 2016, 03:45:41 AM

Previous topic - Next topic

EgonOlsen

I know what you mean. IIRC, I've already changed that behaviour in the latest beta: http://jpct.de/download/beta/jpct_ae.jar.

AeroShark333

Is it possible to shift the pixels in a texture like in the picture in the attachments?
It would be nice if there was some way to 'rotate' the texture in the horizontal direction. (rotate -> imagine the texture in a cylinder-shape)
So basically I'd need something like Texture.rotateHorizontally(float angle); [angle of the pixelshift in the right direction -> imagine the cylinder-shape with the texture applied to it again)
So yeah, if it was a cylinder, I could just rotate the cylinder object itself... using Object3D.rotateY(float angle);
But that's a bit different in my case... Imagine the cylinder having two texture layers. I'd like one texture to rotate with the object (so with Object3D.rotateY(float angle);) but I want the second texture to rotate at another angle.
I hope my explanation was clear enough :p

EgonOlsen

You can set a texture matrix: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setTextureMatrix(com.threed.jpct.Matrix)

If you are using your own, custom shaders, they have to support it though.