multiple coordinates for texture stages?

Started by MichaelJPCT, August 12, 2016, 10:32:27 AM

Previous topic - Next topic

MichaelJPCT

i created a heightmap terrain using Object3D(pos,normal,uv,index,textureID) method.
if i want the the terrain to have at least 2 layers of texture tile - one large tile(repeat 4x4) & one smaller tile of noise(repeat 128x128). in what way should i set it up?
should i use shader?

EgonOlsen

No, you don't have to. You can set new texture coordinates for each polygon by using the PolygonManager. You could read the coordinates of the first layer, multiply them by some value and assign then to the second. That way, you'll get a scaled texture on the second layer. You have to look into TextureInfo as well, because that's what you need to implement this.

MichaelJPCT

thanks. i've read about PolygonManager now.
i would like to know, after manipulating polygons, is the Object3D still compiled (rendered by GL as a batch)? what i concern about is the rendering performance.

EgonOlsen

You should do it before compiling it in this case.

MichaelJPCT