GarageGames/Torque3D — pull request #861 by Azaezel (2014-10-24 07:27:56+00:00)
Title: Sky asset depth

source:
desc.setZReadWrite( true, false ); allows a given renderable object to test the depth buffer but not write to it.
mIsSky is a new material definition for skyboxes
void DeferredSkyHLSL::processVert( Vector &componentList, (and the glsl equivalent) is a method for inserting code into programatically generated shaders. in this case vertex shaders.

script: isSky tagged materials

script(hlsl/glsl): prefabricated hlsl/glsl files reference for cloudlayer and basicclouds objects

immediate purpose: simply adds a variable

long term impact:
One of the primary differences in a prepass lighting vs a more fully parallel deferred approach is that for the former (stock) methodology, lighting is written to the backbuffer, then diffuse is written on top, while for the latter, lighting information goes in one target, and albedo in another for all intents and purposes in a simultaneous manner, then tied up later.

For stock, the lack of depth for sky assets was a non-issue, since these assets were the first thing written after lighting and before the rest of the diffuse-enabled assets. By providing depth and depth testing, this allows one to sort sky assets behind other renderable objects instead of displaying in front of them.