Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::DeferredBloomPass Class Reference

Graphics class that represents the pass for bloom in deferred rendering. More...

Inheritance diagram for Nz::DeferredBloomPass:
Nz::DeferredRenderPass

Public Member Functions

 DeferredBloomPass ()
 Constructs a DeferredBloomPass object by default.
 
unsigned int GetBlurPassCount () const
 Gets the number of pass for blur. More...
 
float GetBrightLuminance () const
 Gets the coefficiant for luminosity. More...
 
float GetBrightMiddleGrey () const
 Gets the coefficiant for the middle grey. More...
 
float GetBrightThreshold () const
 Gets the coefficiant for things to be bright. More...
 
Texture * GetTexture (unsigned int i) const
 Gets the ith texture. More...
 
bool Process (const SceneData &sceneData, unsigned int firstWorkTexture, unsigned int secondWorkTexture) const override
 Processes the work on the data while working with textures. More...
 
bool Resize (const Vector2ui &dimensions) override
 Resizes the texture sizes. More...
 
void SetBlurPassCount (unsigned int passCount)
 Sets the number of pass for blur. More...
 
void SetBrightLuminance (float luminance)
 Sets the coefficiant for luminosity. More...
 
void SetBrightMiddleGrey (float middleGrey)
 Sets the coefficiant for the middle grey. More...
 
void SetBrightThreshold (float threshold)
 Sets the coefficiant for things to be bright. More...
 
- Public Member Functions inherited from Nz::DeferredRenderPass
 DeferredRenderPass ()
 Constructs a DeferredRenderPass object by default.
 
 DeferredRenderPass (const DeferredRenderPass &)=delete
 
void Enable (bool enable)
 Enables the deferred rendering. More...
 
virtual void Initialize (DeferredRenderTechnique *technique)
 Initializes the deferred forward pass which needs the deferred technique. More...
 
bool IsEnabled () const
 Checks whether the deferred rendering is enabled. More...
 
DeferredRenderPassoperator= (const DeferredRenderPass &)=delete
 

Protected Attributes

RenderStates m_bloomStates
 
RenderTexture m_bloomRTT
 
ShaderRef m_bloomBrightShader
 
ShaderRef m_bloomFinalShader
 
ShaderRef m_gaussianBlurShader
 
TextureRef m_bloomTextures [2]
 
TextureSampler m_bilinearSampler
 
bool m_uniformUpdated
 
float m_brightLuminance
 
float m_brightMiddleGrey
 
float m_brightThreshold
 
int m_gaussianBlurShaderFilterLocation
 
unsigned int m_blurPassCount
 
- Protected Attributes inherited from Nz::DeferredRenderPass
Vector2ui m_dimensions
 
DeferredRenderTechniquem_deferredTechnique
 
DeferredRenderQueuem_renderQueue
 
RenderTexture * m_GBufferRTT
 
RenderTexture * m_workRTT
 
Texture * m_depthStencilTexture
 
Texture * m_GBuffer [4]
 
Texture * m_workTextures [2]
 

Detailed Description

Graphics class that represents the pass for bloom in deferred rendering.

Member Function Documentation

◆ GetBlurPassCount()

unsigned int Nz::DeferredBloomPass::GetBlurPassCount ( ) const

Gets the number of pass for blur.

Returns
Number of pass for blur

◆ GetBrightLuminance()

float Nz::DeferredBloomPass::GetBrightLuminance ( ) const

Gets the coefficiant for luminosity.

Returns
Luminosity of bright elements

◆ GetBrightMiddleGrey()

float Nz::DeferredBloomPass::GetBrightMiddleGrey ( ) const

Gets the coefficiant for the middle grey.

Returns
Luminosity of grey elements

◆ GetBrightThreshold()

float Nz::DeferredBloomPass::GetBrightThreshold ( ) const

Gets the coefficiant for things to be bright.

Returns
Threshold for bright elements

◆ GetTexture()

Texture * Nz::DeferredBloomPass::GetTexture ( unsigned int  i) const

Gets the ith texture.

Returns
Texture computed
Parameters
iIndex of the texture
Remarks
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if index is invalid

◆ Process()

bool Nz::DeferredBloomPass::Process ( const SceneData &  sceneData,
unsigned int  firstWorkTexture,
unsigned int  secondWorkTexture 
) const
overridevirtual

Processes the work on the data while working with textures.

Returns
true
Parameters
sceneDataData for the scene
firstWorkTextureIndex of the first texture to work with
firstWorkTextureIndex of the second texture to work with

Implements Nz::DeferredRenderPass.

◆ Resize()

bool Nz::DeferredBloomPass::Resize ( const Vector2ui dimensions)
overridevirtual

Resizes the texture sizes.

Returns
true If successful
Parameters
dimensionsDimensions for the compute texture

Reimplemented from Nz::DeferredRenderPass.

◆ SetBlurPassCount()

void Nz::DeferredBloomPass::SetBlurPassCount ( unsigned int  passCount)

Sets the number of pass for blur.

Parameters
passCountNumber of pass for blur

◆ SetBrightLuminance()

void Nz::DeferredBloomPass::SetBrightLuminance ( float  luminance)

Sets the coefficiant for luminosity.

Parameters
luminanceLuminosity of bright elements

◆ SetBrightMiddleGrey()

void Nz::DeferredBloomPass::SetBrightMiddleGrey ( float  middleGrey)

Sets the coefficiant for the middle grey.

Parameters
middleGreyLuminosity of grey elements

◆ SetBrightThreshold()

void Nz::DeferredBloomPass::SetBrightThreshold ( float  threshold)

Sets the coefficiant for things to be bright.

Parameters
thresholdThreshold for bright elements

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