#include <skydomeshader.h>
Public Member Functions | |
| SkyDomeShader () | |
| ~SkyDomeShader () | |
| void | Update (const osg::Vec2 &sunDir, float turbidity, float energy, float molecules) |
| Update the shader with new values. | |
| osg::VertexProgram * | GetLightScatterinVP () |
| osg::FragmentProgram * | GetDomeFP () |
This shader is built into the Environment and is used by setting the Environment::FogMode to ADV.
| dtCore::SkyDomeShader::SkyDomeShader | ( | ) |
< Magic number
| dtCore::SkyDomeShader::~SkyDomeShader | ( | ) |
| void dtCore::SkyDomeShader::Update | ( | const osg::Vec2 & | sunDir, | |
| 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) |
<To the sun, unit vector
| osg::VertexProgram* dtCore::SkyDomeShader::GetLightScatterinVP | ( | ) | [inline] |
| osg::FragmentProgram* dtCore::SkyDomeShader::GetDomeFP | ( | ) | [inline] |