Unusual VBO slowdown

Started by
11 comments, last by Fingers_ 20 years, 5 months ago
that one for sure, making the most of your cache is always a good thing (though you often end up with fillrate being the limit and all your geometry optimization was pointless).

if your data is nice and sequential you can always just create a vertex struct and use that. the reason i wanted it in seperate buffers was reducing redundant data. for example texture coordinates would repeat a lot and storing only 16x16 is better than storing the same 256coords around 1024 times. so i end up with wild offsets, elements of completely different layout etc. single buffers would have cleaned up the code alot but for some reason were slow as hell.

about your sorting: i assume you just write them to an array in the order of a strip and then remove duplicates? and was it worth the extra work? ,-)
f@dzhttp://festini.device-zero.de
Advertisement
The vertex array is just rows and columns without any duplicated vertices, and it coincides with drawing the triangles in the same order (in rows left to right). This was the first and easiest method I tried and turned out to be the fastest. My sectors are triangular (and curved) rather than square but otherwise it''s very much like any heightmap.

In fact I''ll probably make it actually use a triangle strip per sector instead of a triangle list and see if it goes any faster. I didn''t before because I was thinking about occlusion culling, but it appears that brute-force drawing the whole thing is faster than selectively "skipping" triangles even if I don''t spend too much time selecting what to skip.

last time i tried that (the other way round, from one big strip to triangle list) it didnt make any difference at all, so its quite likely that the index has enough time to be sent while the last vertex is transformed.. but of course i already had a lot of texturing at that point and once youre fillrate limited all those micro optimizations to the geometry submission will become a little pointless anyway.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement