pioneerspacesim/pioneer — pull request #2803 by fluffyfreak (2014-03-05 20:41:29+00:00)
Title: Gas giant plan b

This is the re-PR of #2797 which I will repeat below:

# Description:
This splits the generation and rendering of Gas Giant bodies away from the GeoSphere and related classes.
I've started to do this so that they can properly diverge in terms of the shaders used, textures generated and the underlying geometry.

Part of the motivation for this is to simplify each of the planetary generation and rendering systems to make it easy to customise them in the future.

NB: I may re-use this for Stars as well since they really don't need the whole quad-tree LOD system.

# Future work:
This is less ambitious than what I was originally aiming for which was to generate all the textures on the GPU itself with render-to-texture, I have another branch where that work will continue.

Instead I'm using the job system to build each face of the gas giants cubemaps as a separate job, once they're all complete it builds a cubemap texture and allows the gas giant to be rendered.

# The work itself:
This pulls the GeoSphere apart into a BaseSphere base class and GasGiant and GeoSphere derived classes.
There's still a lot of code duplication and the interfaces all need a good cleanup but I'm doing all of that quite heavily elsewhere too and I expect this whole area to be changing constantly for the next few months.

There's a new terrain job for generating the texture colour information. Everything is self contained within the GasGiant header and cpp for handling that. The new gas giant shader is a duplicate of the geosphere shader that has then been cut down to use a cube map texture and remove all of the non-gas-giant uses. Likewise the GasGiantMaterial is similiarly forked and modified from GeoSphereMaterial.

Andy