Wednesday, February 5, 2014

Fun stuff... ?

Minor stress test for new batching prototype: instead of particles generate a gameobject for each foliage, disable LoD, and disable octree / occlusion to only use frustum culling.  Converting voxel terrain to heighmaps for proper foliage system needs to happen sooner now.  So that's 5.756ms out of 9.725ms a frame just for CPU frustum culling everything in a "tiny" ~8kmx8km test.  Going to be moving frustum culling back to the batching thread instead of the dispatch thread where it belongs.  Also going to start using microseconds instead of milliseconds, since I'm starting to hit 0.000ms timers too often.  Basically beat up the CPU testing.  BTW everything is lit using Oren-Nayar + Cook-Torrance even if you can't tell with ugly programmer art / generated level.  I need to add some wolves made out of particle effects like fire and smoke or something jazzy...

Kind of fun wasting 23.323ms on vsync due to some DE bullshit forcing everything to 30Hz... might ditch SDL2 again for GLX with proper triple buffering and timing again if I go back to triple head gameplay more often...  not bad for a mobile GPU still.

Why was this fun?  Well I have a hardcoded limit for PC that's pretty high or so I thought:
ERROR: AglRenderQueue overflow.

The scene that hit that error ( not pictured, boo ) was quite dense, but still was mostly waiting for flips not dispatch.  In other words I can render more things than I allow to be queued from batching thread now.  I will miss you uint16_t!  I would've liked to take a screenshot of that scene, but I may daisy change ringbuffers or something silly to avoid bumping up my numeric limits right now.  Can't wait to see what will happen when I move to a fully indirect / wide batching system as this is just dispatching VBOs off a single thread for the most part -- not counting slow, legacy bullshit used by string drawing and UI.  OMG PCs are finally catching up with consoles for drawcalls.  "Beyond Porting" slides from nvidia are a good resource to get started.

Still planning on fixing all the nuts and bolts stuff before finishing the hydraulic erosion... still tempted to drop all that and work on terrain editor with LeapMotion / Wacom -- but I need to make the voxel terrain swap out meshes more cleanly for realtime editing first.

Another screenshot from old test level because I thought this generated hill was pretty...