OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::IrradianceField Class Reference

Implements an Irradiance Field with Depth, inspired on DDGI. More...

#include <OgreIrradianceField.h>

+ Inheritance diagram for Ogre::IrradianceField:

Public Types

enum  DebugVisualizationMode { DebugVisualizationColour , DebugVisualizationDepth , DebugVisualizationNone }
 

Public Member Functions

 IrradianceField (Root *root, SceneManager *sceneManager)
 
 ~IrradianceField ()
 
void createTextures ()
 
void destroyTextures ()
 
void fillConstBufferData (const Matrix4 &viewMatrix, float *RESTRICT_ALIAS passBufferPtr) const
 
size_t getConstBufferSize () const
 
uint8 getDebugTessellation () const
 
bool getDebugVisualizationMode () const
 
TextureGpugetDepthVarianceTex () const
 
TextureGpugetIrradianceTex () const
 
void initialize (const IrradianceFieldSettings &settings, const Vector3 &fieldOrigin, const Vector3 &fieldSize, VctLighting *vctLighting)
 initialize More...
 
void reset ()
 If VctLighting was updated with minor changes (e.g. More...
 
void setDebugVisualization (IrradianceField::DebugVisualizationMode mode, SceneManager *sceneManager, uint8 tessellation)
 
void update (uint32 probesPerFrame=200u)
 
- Public Member Functions inherited from Ogre::IdObject
 IdObject (IdType id)
 We don't call generateNewId() here, to prevent objects in the stack (i.e. More...
 
IdType getId () const
 Get the unique id of this object. More...
 
bool operator() (const IdObject &left, const IdObject &right)
 
bool operator() (const IdObject *left, const IdObject *right)
 

Detailed Description

Implements an Irradiance Field with Depth, inspired on DDGI.

We use the voxelized results from VCT. Afterwards once we have Raytracing, we'll also allow to use Raytracing instead; since both are very similars (with VCT we shoot cones instead of rays)

See also
Snippet taken from Dynamic Diffuse Global Illumination with Ray-Traced Irradiance Fields Zander Majercik, NVIDIA; Jean-Philippe Guertin, Université de Montréal; Derek Nowrouzezahrai, McGill University; Morgan McGuire, NVIDIA and McGill University http://jcgt.org/published/0008/02/01/
https://github.com/OGRECave/ogre-next/issues/29

Member Enumeration Documentation

◆ DebugVisualizationMode

Enumerator
DebugVisualizationColour 
DebugVisualizationDepth 
DebugVisualizationNone 

Constructor & Destructor Documentation

◆ IrradianceField()

Ogre::IrradianceField::IrradianceField ( Root root,
SceneManager sceneManager 
)

◆ ~IrradianceField()

Ogre::IrradianceField::~IrradianceField ( )

Member Function Documentation

◆ createTextures()

void Ogre::IrradianceField::createTextures ( )

◆ destroyTextures()

void Ogre::IrradianceField::destroyTextures ( )

◆ fillConstBufferData()

void Ogre::IrradianceField::fillConstBufferData ( const Matrix4 viewMatrix,
float *RESTRICT_ALIAS  passBufferPtr 
) const

◆ getConstBufferSize()

size_t Ogre::IrradianceField::getConstBufferSize ( ) const

◆ getDebugTessellation()

uint8 Ogre::IrradianceField::getDebugTessellation ( ) const

◆ getDebugVisualizationMode()

bool Ogre::IrradianceField::getDebugVisualizationMode ( ) const

◆ getDepthVarianceTex()

TextureGpu* Ogre::IrradianceField::getDepthVarianceTex ( ) const
inline

◆ getIrradianceTex()

TextureGpu* Ogre::IrradianceField::getIrradianceTex ( ) const
inline

◆ initialize()

void Ogre::IrradianceField::initialize ( const IrradianceFieldSettings settings,
const Vector3 fieldOrigin,
const Vector3 fieldSize,
VctLighting vctLighting 
)

initialize

Parameters
settings
fieldOrigin
fieldSize
vctLightingThis value is ignored if IrradianceFieldSettings::usesRaster() returns true, and must be non-null if it returns false

◆ reset()

void Ogre::IrradianceField::reset ( )

If VctLighting was updated with minor changes (e.g.

light position/direction changed, number of bounces setting changed) then call this function so update() process it again.

If major changes happens to VctLighting, then call initialize() again

◆ setDebugVisualization()

void Ogre::IrradianceField::setDebugVisualization ( IrradianceField::DebugVisualizationMode  mode,
SceneManager sceneManager,
uint8  tessellation 
)
Parameters
mode
sceneManagerCan be nullptr only if mode == IrradianceField::DebugVisualizationNone
tessellationValue in range [3; 16] Note this value increases exponentially: tessellation = 3u -> 24 vertices (per sphere) tessellation = 4u -> 112 vertices tessellation = 5u -> 480 vertices tessellation = 6u -> 1984 vertices tessellation = 7u -> 8064 vertices tessellation = 8u -> 32512 vertices tessellation = 9u -> 130560 vertices tessellation = 16u -> 2.147.418.112 vertices

◆ update()

void Ogre::IrradianceField::update ( uint32  probesPerFrame = 200u)

The documentation for this class was generated from the following file: