Adjusting The Heavens
A strange sort of day, in perhaps two parts. A speedy first half where I added the ability to adjust bloom and light ray intensity settings via hot-keys and a rather slow second half where I battled with a dreaded 'corrupt heap' issue for countless hours.
I then had a third part in my increasingly inaccurately termed 'day' when I introduced real-time shadows and shaders to the editor itself, not just the in-game part. The result was pretty cool, as the shadow allowed a real sense of placement when planting entities down.
Entities do not self shadow at the moment, but that's just a case of adding some lines of code into the entity pixel shader. My fear is performance, but I managed to do a decent 'generalized shadow' for the grass and if the shader begins to slow, I can always revert to that technique. As we now run the engine on 16 texture stages, slot availability is not the problem but I should be vigilant about asking TOO much of all my shaders. I am pretty sure though that everyone reading this will insist entities self-shadow, and that the performance concerns get resolved forthwith and without delay ;)
Also the scene is sorted by texture, not by depth, so there is perhaps a huge performance gain to exploit when I switch scene rendering to the new sort mode. Apparently 'overdraw' is still the enemy of a fast graphics engine, and rendering a huge brick wall in front of the camera first is always recommended when you have intense pixel shaders in 'da house.
As you can see from the above snap, more content is pouring in (and more to follow) which should give us more scope for new screenshots and presenting in-game suggested situations.
Now that the entity shaders and shadows are working on both sides of the divide (editor and game), my main task for Tuesday is to get saving and loading to work properly to finally be able to store terrain edits. Right now it only stores entity placements. Rick is also pushing for a 'random tree and bush plotter' in the editor to allow rapid generation of small groves of trees, which is not a bad idea. The palm tree shot you saw before was the result of a similar random algorithm which varied position, rotation, scale and even incline. I am sure I can rustle up some spray gun which can fire of entities at the terrain without bunching them up and allowing for this natural scatter effect. You may not believe it, but in the palm tree shot from a few days ago, all the trees where identical, and only differed by position, rotation and scale. This opens the door to instance objects which will give the engine a superb advantage in terms of memory consumption and rendering speed.
If there is more time Tuesday, and I think there will be, I will probably add the guns back in to the engine and see if I can get the flak coded up. It's a tall order, but one needs goals! I also need to load the latest version only my fastest Ultrabook so I can demo the version at a meeting on Wednesday, so that will be a test for it's Windows 8 compatibility AND it's ability to run well on a mobile GPU. No pressure ;)