- Home /
Would painting a solid colour (such as black) on unity terrain help performance?
Was wondering if painting terrain in areas that unseen to black or white, if it would help performance, sense that way, it is not drawing a more intricate texture?
PS HAPPY NEWYEAR!.. well almost... :)
since the texture for the terrain is tiled, it probably won't make much difference
If you have pro, use Occlusion Culling... If not, it really doesn't make a difference, acctually, it would mean, that it would have to load another texture into memory and therefore be slower...
Answer by Jozxyqk · Jan 01, 2013 at 04:28 AM
The main slowdown is probably triangle processing. Occlusion culling sounds like a great start, but you really want manual vertex culling. You might get a very small gain from discarding fragments which are known to be in a black area avoiding further texture and lighting computation. Unfortunately geometry shaders are not accessible, but culling triangles there doesn't stop the vertex shader processing their vertices anyway.
I think your best bet is to split the terrain up into tiles and only draw the tiles which are not completely black. I'll throw out a guess that unity doesn't offer much of an interface for splitting up terrain. A good size for your tiles will probably be too small to bother creating manually, so maybe try to generate tiles at launch. Hopefully you won't have to carve up the terrain maps and can simply generate terrain tiles which all point to the same texture data, just with different offsets.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to make blocks collide - help fast please 1 Answer
Racing game roads help 0 Answers
No tree models in my Unity Help! 1 Answer
[Optimization] How can i optimize this voxel terrain more? 3 Answers