TerrainPage

Is there an example that uses TerrainPage and performs some culling? I switched my TerrainBlock to TerrainPage but it still renders most are all of the terrain, do I need to set a cullstate somewhere or something?



Also, anyone understand what setDetailTexture does, I played with it and it just seemed to make one texture or another take over the entire terrain, the docks don’t explain it in a way that makes sense to me.

try rendering your bounds to help understand what should be culled. If you can see the bounds of a part of the terrain, it won’t be culled.



Also, TestTerrainPage has code in it for using detail textures. Check that out. In a nutshell, it applies a secondary texture to a terrain, repeating it across the terrain and combining it with the main texture. It is important to have the right texture params set for this to work right.

setDetailTexture(1, 16); is the only code I notice related to it, the reason I don’t think people understand it (including myself of course) is because every example of terrain use I’ve seen has that line exactly, same params.



I should have looked at the bounds before, there was 4 bounds, and I just fixed that so there would be many more which improves things a bit.