Atmospherics Renderer¶
-
class AtmosphericsRenderer¶
The graphics API-independent base class for atmospherics renderers, which draw distance fades, aerial perspective, fog and so on.
Public Functions
-
virtual void RestoreDeviceObjects(platform::crossplatform::RenderPlatform *r)¶
Platform-dependent function called when initializing the atmospherics renderer.
-
virtual void InvalidateDeviceObjects()¶
Platform-dependent function called when uninitializing the atmospherics renderer.
-
void PreRenderUpdate(platform::crossplatform::GraphicsDeviceContext&)¶
Once per-frame update. Do this before any rendering each frame.
-
void SetIlluminationTexture(platform::crossplatform::Texture*)¶
Set the texture defining the extent of illuminated inscatter. R=near, G=far, B and A unused.
-
const ScatteringVolume *GetScatteringVolume(int view_id)¶
Get the per-frame 3D volume scattering texture for the given view id.
-
inline virtual void SetCloudShadowData(const CloudShadowData &cloudShadowData_)¶
Set the data to be used for light scattering.
-
void LoadShaders()¶
Platform-dependent function to reload the shaders - only use this for debug purposes.
-
void SetCameraPosition(const float *pos)¶
Get the current location of the camera.
-
void SetSkyInterface(simul::sky::SkyKeyframer *si)¶
Set the sky and atmospherics interface to allow the renderer to use the correct lighting values.
-
inline void SetFogHeightKm(float h_km)¶
Set the height of the fog.
-
inline void SetFogDensity(float d)¶
Set the density of the fog.
-
virtual void RestoreDeviceObjects(platform::crossplatform::RenderPlatform *r)¶
-
struct ScatteringVolume¶