Hi all another time ^^,
my new goal is setting up a textureBuffer like in the plane in testing parallax;
My teapot dont get well Height map… maybe i need to export better from 3ds?
Is it possible use a tweak like the plane?
FloatBuffer tex1 = createTextureBuffer(new Vector2f(1f, 0f));
FloatBuffer tex2 = createTextureBuffer(new Vector2f(0f, 1f));
TextureState tPlane = Material.getTextureState( new String[]{"data/textures/rockwall2.png", "data/textures/rockwall_normal2.png", "data/textures/rockwall_height2.png"} );
Quad plane = new Quad("plane", 1000f, 1000f);
plane.setTextureBuffer(0, tex1, 1);
plane.setTextureBuffer(0, tex2, 2);
public static FloatBuffer createTextureBuffer(Vector2f vector)
{
FloatBuffer textureBuffer = BufferUtils.createVector2Buffer(4);
for (int x = 0; x < 4; x++) textureBuffer.put(vector.x).put(vector.y);
return textureBuffer;
}
The shot of the teapot:
