![]() |
VR-Forces 5.0.2 Developer's Guide
|
State component that injects lighting shaders and uniforms into a state set. It also has a DtLightComputeProgram that does a 2 pass set up/computation of lights affecting screen space tiles, which is then subsequently used by the lighting.

Classes | |
| struct | TileLightIndexInfo |
Public Member Functions | |
| DtOsgLightingComponent (DtDe &de) | |
| virtual | ~DtOsgLightingComponent () |
| virtual void | update (const VectorLights &lights, const osg::State &state, const osg::Camera *camera) |
| virtual const Vector2_uint32 & | tileSize (void) const |
| virtual const Vector2_uint32 & | gridMaxDims (void) const |
| virtual void | updateLightSourceIndexBufferHandle (const osg::Camera *camera, DtGlBuffer *handle, int maxNumLightSources) |
| virtual osg::Uniform * | getEnableLightingUniform () const |
| virtual void | setAmbientFactor (float ambientFactor) |
| virtual void | setUseGlobalAmbient (bool useGlobalAmbient) |
| virtual void | setDiffuseFactor (float diffuseFactor) |
| virtual void | setUseGlobalDiffuse (bool useGlobalDiffuse) |
| virtual void | setUseHDR (bool useHDR) |
| virtual void | slot_reloadShader () |
| virtual void | setDirty (bool isDirty) |
| virtual void | setEmissionFactor (float emissionFactor) |
| virtual bool | dirty () const |
| virtual void | releaseGLObjects (void) |
| virtual bool | install (osg::StateSet *stateset) |
| virtual bool | uninstall (osg::StateSet *stateset) |
| virtual bool | isInstalled (void) const |
| virtual void | setComponentVisualizationMode (int mode) |
| virtual const DtLightingComponentShaderConstants * | shaderConstants (void) const |
| virtual DtLightingComponentShaderConstants * | shaderConstants (void) |
Public Member Functions inherited from makVrv::DtOsgStateComponent | |
| DtOsgStateComponent (DtDe &de) | |
Static Public Member Functions | |
| static int | textureStartOffset (void) |
Protected Types | |
| typedef std::unordered_map < DtGlBuffer *, int > | BufferToLightIndexMap |
| typedef std::unordered_map < const osg::Camera *, TileLightIndexInfo > | CameraToTileLightIndexMapInfoMap |
Protected Member Functions | |
| virtual void | setLightPointScale (double scale) |
| virtual void | setDynamicLightScale (double scale) |
| virtual void | setEmissiveTextureScale (double scale) |
| virtual void | setSpecularScale (double scale) |
| virtual void | setShininessScale (double scale) |
| virtual osg::ref_ptr < osg::Uniform > | createUniform (const std::string &name, osg::Uniform::Type type, int count=1) |
| virtual void | packLights (const osg::Matrixd &normalMatrix, const VectorLights &lights, const osg::State &state) |
| virtual void | updateTextureLightDataGrid (void) |
| virtual void | updateTiledShadingData (const VectorLights &lights, const osg::State &state, const osg::Camera *camera) |
| virtual void | updateTileLightIndexList (const std::vector< Matrix4_64 > &projectionMatrix, const std::vector< Vector3_64 > &vWorldEye, const std::vector< Vector3_64 > &vWorldCenter, const std::vector< Vector3_64 > &vWorldUp, const Vector2_uint32 &viewportSize, const osg::Camera *camera) |
| virtual void | initializeColorRampTexture () |
| virtual int | lightGridSize () |
| virtual int | maxUboSize () |
| virtual void | setUpDebugTextureComponentMode (void) |
| virtual std::string | findDebugTexturePath (void) const |
Protected Member Functions inherited from makVrv::DtOsgStateComponent | |
| virtual | ~DtOsgStateComponent () |
| virtual const std::string & | loadShaderSource (const std::string &strFileName) const |
Static Protected Attributes | |
| static bool | bColorRampTextureWasTried |
| static const float | theLightPointHdrScalar |
| static const float | theDynamicLightHdrScalar |
| static const float | theEmissiveTextureHdrScalar |
Private Member Functions | |
| DtOsgLightingComponent ()=delete | |
| DtOsgLightingComponent (const DtOsgLightingComponent &)=delete | |
| DtOsgLightingComponent & | operator= (const DtOsgLightingComponent &)=delete |
Friends | |
| class | DtOsgLightingComponentUboCallback |
|
protected |
|
protected |
| makVrv::DtOsgLightingComponent::DtOsgLightingComponent | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
privatedelete |
private default constructor. not allowed.
|
privatedelete |
prevent copy-construction
|
privatedelete |
prevent assignment
|
virtual |
Update the lighting uniforms with new light data.
|
virtual |
get the tile size
|
virtual |
get the grid max dimensions
|
virtual |
add/update/remove a light source index buffer handle/size entry in the map
|
virtual |
Gets the uniform that toggles lighting.
|
virtual |
Sets the ambient factor uniform.
|
virtual |
Enables/Disables the usage of the material ambient and global ambient.
|
virtual |
Sets the difuse factor uniform.
|
virtual |
Enables/Disables the usage of the material diffuse and global diffuse.
|
virtual |
Enables/Disables HDR Lighting.
|
virtual |
reload the light source compute shaders
|
inlinevirtual |
Sets dirty state for reinstallation.
|
virtual |
Sets the emission factor uniform.
|
inlinevirtual |
Checks if component needs to be re-installed.
|
virtual |
|
virtual |
Install this component on a state set.
Implements makVrv::DtOsgStateComponent.
|
virtual |
Uninstall this component from a state set.
Implements makVrv::DtOsgStateComponent.
|
virtual |
checks whether its installed
|
virtual |
set the component visualization mode
|
virtual |
get the shader constants
|
virtual |
get the shader constants, non const
|
static |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
run the compute shaders in order to update the per camera lighting data and bin the lights in screenspace.
|
protectedvirtual |
Updates the per-light-grid index lists.
|
protectedvirtual |
Updates the offsets and counts into the index grid.
|
protectedvirtual |
Returns the number of lights in the light grid.
|
protectedvirtual |
Returns the maximum UBO size that we'll use for a light UBO.
|
protectedvirtual |
set up the debug texture mode
|
protectedvirtual |
find the path of the debug texture
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Holds a set of indexes, one per light tile. This can get big, so cannot fit in a UBO.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |