#include <sunlightshader.h>
Public Member Functions | |
| SunlightShader () | |
| ~SunlightShader () | |
| void | Update (const osg::Vec2 &sunDir, const osg::Vec3 &eyeXYZ, float turbidity, float energy, float molecules) |
| Update the shader with new values. | |
| osg::VertexProgram * | GetLightScatterinVP () |
| osg::FragmentProgram * | GetTerrainFP () |
This shader is built into the Environment and is used by setting the Environment::FogMode to ADV.
| dtCore::SunlightShader::SunlightShader | ( | ) |
< Magic number
| dtCore::SunlightShader::~SunlightShader | ( | ) |
| void dtCore::SunlightShader::Update | ( | const osg::Vec2 & | sunDir, | |
| const osg::Vec3 & | eyeXYZ, | |||
| float | turbidity, | |||
| float | energy, | |||
| float | molecules | |||
| ) |
Update the shader with new values.
| sunDir | : The az/el of the sun in Degrees. sunDir[0] = az (0=north, 180=south) sunDir[1] = el (90=horizon, 0=zenith) | |
| eyeXYZ | : The Camera position (meters) | |
| turbidity | : The quality of the air (1.0 seems about right) | |
| energy | : The amount of energy passed to the atmosphere (10.0 is about right) | |
| molecules,: | The number of molecules per unit volume (0 = fully opaque, 2.545e25 looks about right) |
| osg::VertexProgram* dtCore::SunlightShader::GetLightScatterinVP | ( | ) | [inline] |
| osg::FragmentProgram* dtCore::SunlightShader::GetTerrainFP | ( | ) | [inline] |