SSAORenderer
in package
Table of Contents
Constants
- MAX_SAMPLES = 64
- The maximum number of samples supported by the SSAO shader
- NOISE_TEXTURE_SIZE = 4
- The noise texture size
Properties
- $currentQuality : SSAOQuality
- Current SSAO quality configuration
- $gl : GLState
- $kernel : FloatBuffer
- Kernel for SSAO
- $noiseTexture : Texture
- Noise texture for SSAO
- $quad : QuadVertexArray
- Quad vertex array
- $ssaoBlurShaderProgram : ShaderProgram
- SSAO blur shader program
- $ssaoShaderProgram : ShaderProgram
- SSAO shader program
Methods
- __construct() : mixed
- Constructor
- attachPass() : void
- Attaches a render pass to the pipeline
- getCurrentQuality() : SSAOQuality
- Get current quality configuration
- getCurrentQualityName() : string
- Get current quality name
- setQuality() : void
- Set SSAO quality configuration
- generateKernel() : void
- generateNoiseTexture() : void
- lerp() : float
Constants
MAX_SAMPLES
The maximum number of samples supported by the SSAO shader
private
mixed
MAX_SAMPLES
= 64
NOISE_TEXTURE_SIZE
The noise texture size
private
mixed
NOISE_TEXTURE_SIZE
= 4
Properties
$currentQuality
Current SSAO quality configuration
private
SSAOQuality
$currentQuality
$gl
private
GLState
$gl
$kernel
Kernel for SSAO
private
FloatBuffer
$kernel
$noiseTexture
Noise texture for SSAO
private
Texture
$noiseTexture
$quad
Quad vertex array
private
QuadVertexArray
$quad
$ssaoBlurShaderProgram
SSAO blur shader program
private
ShaderProgram
$ssaoBlurShaderProgram
$ssaoShaderProgram
SSAO shader program
private
ShaderProgram
$ssaoShaderProgram
Methods
__construct()
Constructor
public
__construct(GLState $gl, ShaderCollection $shaders) : mixed
Parameters
- $gl : GLState
-
The current GL state.
- $shaders : ShaderCollection
-
The shader collection to use.
attachPass()
Attaches a render pass to the pipeline
public
attachPass(RenderPipeline $pipeline) : void
Parameters
- $pipeline : RenderPipeline
getCurrentQuality()
Get current quality configuration
public
getCurrentQuality() : SSAOQuality
Return values
SSAOQualitygetCurrentQualityName()
Get current quality name
public
getCurrentQualityName() : string
Return values
stringsetQuality()
Set SSAO quality configuration
public
setQuality(SSAOQuality $quality) : void
Parameters
- $quality : SSAOQuality
generateKernel()
private
generateKernel() : void
generateNoiseTexture()
private
generateNoiseTexture() : void
lerp()
private
lerp(float $a, float $b, float $f) : float
Parameters
- $a : float
- $b : float
- $f : float