16
Support / Re: Terrain and GenericVertexController..
« on: March 23, 2013, 10:07:20 am »Yes, that's correct. The reason is that the geometry will be batched/compiled based on texture states.
Ok, well then the second option is to include the texture and use UV coords. I made a new texture containing a light texture 256x512 and a dark texture 256x512 horizontal left and right.
( i first did it 512x512 and 512x512, the total texture size is 1024x512 and it loaded well )
When i want to map the first texture i just do x 0.0 to 0.4999, but i can't seem to get the second one from 0.5 to 1.0. When i try that i just get the whole texture. I tried a lot of things..
UPDATE:
I found reTexture() code on the forum that works well. It takes a variable tileFactor, when i put that to -0.5 it maps the left upper part of the texture and when i put that to 0.5 it maps the low right part. So i created my texture accordingly. This seems to work for me, i know it's a bit unnecessary memory consumption not using the upper right and lower left part of the texture pixels.