H3D API  2.4.1
Functions
H3D::ShadowCasterShaders Namespace Reference

Functions for use by the ShadowCaster node to generate a shader to use for shader volume rendering depending on different options. More...

Functions

void shaderInit (bool cpu_shadows, bool draw_caps, bool is_dir_light, bool single_pass_stereo, float matrixViewShift, float matrixProjShift)
 Initialize and enable a shader for the given properties for use in a ShadowCaster node.
 
void shaderToggle (bool on)
 Enable/disable the shader currently in use.
 
void shaderClean ()
 Disable the shader and clean up any other settings made by it.
 
bool setPointLightPosition (const Vec3f &pos)
 Set the point light position in the shader (only valid for geometry shader version of shader). More...
 
bool setDirectionalLightDir (const Vec3f &dir)
 Set the directional light direction in the shader (only valid for geometry shader version of shader). More...
 
bool setTransformMatrix (const Matrix4f &m)
 Set the transform matrix for the shadow relative to the graphics object in the shader. More...
 

Detailed Description

Functions for use by the ShadowCaster node to generate a shader to use for shader volume rendering depending on different options.

NOTE: Do not try to use these on their own. They're only meant for ShadowCaster node internal use. Examples:

Function Documentation

◆ setDirectionalLightDir()

bool H3D::ShadowCasterShaders::setDirectionalLightDir ( const Vec3f &  dir)

Set the directional light direction in the shader (only valid for geometry shader version of shader).

Returns true on success.

◆ setPointLightPosition()

bool H3D::ShadowCasterShaders::setPointLightPosition ( const Vec3f &  pos)

Set the point light position in the shader (only valid for geometry shader version of shader).

Returns true on success.

◆ setTransformMatrix()

bool H3D::ShadowCasterShaders::setTransformMatrix ( const Matrix4f &  m)

Set the transform matrix for the shadow relative to the graphics object in the shader.

Returns true on success.

Referenced by H3D::ShadowGeometry::renderShadowGPU().