Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
Demo::MiscUtils Class Reference

#include <MiscUtils.h>

Static Public Member Functions

static void setGaussianLogFilterParams (Ogre::HlmsComputeJob *job, Ogre::uint8 kernelRadius, float gaussianDeviationFactor, Ogre::uint16 K)
 
static void setGaussianLogFilterParams (const Ogre::String &materialName, Ogre::uint8 kernelRadius, float gaussianDeviationFactor, Ogre::uint16 K)
 Adjusts the material (pixel shader variation). See other overload for param description. More...
 

Member Function Documentation

◆ setGaussianLogFilterParams() [1/2]

void Demo::MiscUtils::setGaussianLogFilterParams ( const Ogre::String &  materialName,
Ogre::uint8  kernelRadius,
float  gaussianDeviationFactor,
Ogre::uint16  K 
)
static

Adjusts the material (pixel shader variation). See other overload for param description.

◆ setGaussianLogFilterParams() [2/2]

void Demo::MiscUtils::setGaussianLogFilterParams ( Ogre::HlmsComputeJob *  job,
Ogre::uint8  kernelRadius,
float  gaussianDeviationFactor,
Ogre::uint16  K 
)
static
Parameters
jobThe compute job to change.
kernelRadiusThe kernel radius. A radius of 8 means there's 17x17 taps (8x2 + 1). Changing this parameter will trigger a recompile.
gaussianDeviationFactorThe std. deviation of a gaussian filter.
KA big K (K > 20) means softer, blurrier shadows; but may reveal some artifacts on the edge cases ESM does not deal well, while small K (< 8) may hide those artifacts, but makes the shadows fat (fatter than normal, still blurry) and very dark. Small K combined with large radius (radius > 8) may cause self shadowing artifacts. A K larger than 80 may run into floating point precision issues (which means light bleeding or weird shadows appearing caused by NaNs). Changing this parameter will trigger a recompile.

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