#include <GlobalIlluminationCiVct.hh>
|
| CiVctCascade () |
| Constructor.
|
|
virtual | ~CiVctCascade () |
| Destructor.
|
|
virtual gz::math::Vector3d | AreaHalfSize () const =0 |
| Returns area in units around the camera to voxelize.
|
|
virtual bool | AutoMultiplier () const =0 |
| Retrieve current setting. See SetAutoMultiplier.
|
|
virtual gz::math::Vector3d | CameraStepSize () const =0 |
| Returns the camera step size.
|
|
virtual bool | CorrectAreaLightShadows () const =0 |
| Retrieve current setting. See SetCorrectAreaLightShadows.
|
|
virtual const uint32_t * | OctantCount () const =0 |
| Returns number of octant subdivisions per axis.
|
|
virtual const uint32_t * | Resolution () const =0 |
| Returns 3D Voxel resolution.
|
|
virtual void | SetAreaHalfSize (const gz::math::Vector3d &_areaHalfSize)=0 |
| The area in units around the camera to voxelize Each cascade area size must be >= than the previous one i.e. assert( cascade[i]->AreaHalfSize >= cascade[i-1]->AreaHalfSize );.
|
|
virtual void | SetAutoMultiplier (bool _autoMultiplier)=0 |
| Whether we should calculate the ideal multiplier based on lights on scene to minimize quantization loss from storing all GI data in RGBA8_UNORM_sRGB (which is not enough for HDR). For more info see Ogre's VctLighting::setBakingMultiplier.
|
|
virtual void | SetCameraStepSize (const gz::math::Vector3d &_stepSize)=0 |
| How much we let the camera move before updating the cascade Value is in range [1; inf)
|
|
virtual void | SetCorrectAreaLightShadows (bool _correctAreaLightShadows)=0 |
| Sets whether to correctly calculate GI occlusion caused by occluders against area lights. Consumes more VRAM. This option is not needed if you're not using area lights.
|
|
virtual void | SetOctantCount (const uint32_t _octants[3])=0 |
| Number of divisions per axis to divide the scene into multiple octants. Setting this value > 1 may improve voxelization performance but it may also decrease it. Profiling is required for each scene.
|
|
virtual void | SetResolution (const uint32_t _resolution[3])=0 |
| Resolution of the 3D Voxel. Must be multiple of 2.
|
|
virtual void | SetThinWallCounter (float _thinWallCounter)=0 |
| Shadows are calculated by raymarching towards the light source. However sometimes the ray 'may go through' a wall due to how bilinear interpolation works.
|
|
virtual float | ThinWallCounter () const =0 |
| Value of CiVctCascade::SetThinWallCounter.
|
|
◆ CiVctCascade()
◆ ~CiVctCascade()
◆ AreaHalfSize()
Returns area in units around the camera to voxelize.
- Returns
- area in units around the camera to voxelize
◆ AutoMultiplier()
virtual bool AutoMultiplier |
( |
| ) |
const |
|
pure virtual |
Retrieve current setting. See SetAutoMultiplier.
- Returns
- True if the feature is enabled
◆ CameraStepSize()
Returns the camera step size.
- Returns
- Camera step size
◆ CorrectAreaLightShadows()
virtual bool CorrectAreaLightShadows |
( |
| ) |
const |
|
pure virtual |
Retrieve current setting. See SetCorrectAreaLightShadows.
- Returns
- True if the feature is enabled
◆ OctantCount()
virtual const uint32_t * OctantCount |
( |
| ) |
const |
|
pure virtual |
Returns number of octant subdivisions per axis.
- Returns
- Octant subdivisions. Length of array is 3
◆ Resolution()
virtual const uint32_t * Resolution |
( |
| ) |
const |
|
pure virtual |
Returns 3D Voxel resolution.
- Returns
- Resolution in each axis. Length of array is 3
◆ SetAreaHalfSize()
The area in units around the camera to voxelize Each cascade area size must be >= than the previous one i.e. assert( cascade[i]->AreaHalfSize >= cascade[i-1]->AreaHalfSize );.
For best results, area half sizes from each cascade should be multiples of each other
- Parameters
-
◆ SetAutoMultiplier()
virtual void SetAutoMultiplier |
( |
bool | _autoMultiplier | ) |
|
|
pure virtual |
Whether we should calculate the ideal multiplier based on lights on scene to minimize quantization loss from storing all GI data in RGBA8_UNORM_sRGB (which is not enough for HDR). For more info see Ogre's VctLighting::setBakingMultiplier.
- Parameters
-
[in] | _autoMultiplier | True to enable the feature. Default. |
◆ SetCameraStepSize()
How much we let the camera move before updating the cascade Value is in range [1; inf)
Camera is evaluated in quantized steps. i.e. stepSize = cameraStepSize * 2.0 * areaHalfSize / resolution stepSize = cameraStepSize * getVoxelCellSize()
If cameraStepSize = 1, after the camera moves stepSize units, we will move & update the cascades If cameraStepSize = 2, after the camera moves 2 * stepSize units, we will move & update the cascades
Small step sizes may cause too much brightness jumping as VCT may not be stable. Very big step sizes may cause periodic performance spikes or sudden changes in brightness.
- Parameters
-
[in] | _stepSize | Step size in units |
◆ SetCorrectAreaLightShadows()
virtual void SetCorrectAreaLightShadows |
( |
bool | _correctAreaLightShadows | ) |
|
|
pure virtual |
Sets whether to correctly calculate GI occlusion caused by occluders against area lights. Consumes more VRAM. This option is not needed if you're not using area lights.
- Parameters
-
[in] | _correctAreaLightShadows | True to enable the feature |
◆ SetOctantCount()
virtual void SetOctantCount |
( |
const uint32_t | _octants[3] | ) |
|
|
pure virtual |
Number of divisions per axis to divide the scene into multiple octants. Setting this value > 1 may improve voxelization performance but it may also decrease it. Profiling is required for each scene.
- Parameters
-
[in] | _octants | Number of octant subdivisions per axis |
◆ SetResolution()
virtual void SetResolution |
( |
const uint32_t | _resolution[3] | ) |
|
|
pure virtual |
Resolution of the 3D Voxel. Must be multiple of 2.
- Parameters
-
[in] | _resolution | Resolution |
◆ SetThinWallCounter()
virtual void SetThinWallCounter |
( |
float | _thinWallCounter | ) |
|
|
pure virtual |
Shadows are calculated by raymarching towards the light source. However sometimes the ray 'may go through' a wall due to how bilinear interpolation works.
Bilinear interpolation can produce nicer soft shadows, but it can also cause this light leaking from behind a wall.
Increase this value (e.g. to 2.0f) to fight light leaking. This should generally (over-)darken the scene
Lower values will lighten the scene and allow more light leaking
Note that thinWallCounter can not fight all sources of light leaking, thus increasing it to ridiculous high values may not yield any benefit.
- Parameters
-
[in] | _thinWallCounter | Value in range (0; inf) |
◆ ThinWallCounter()
virtual float ThinWallCounter |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: