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

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

Inheritance diagram for Nz::DeferredPhongLightingPass:
Nz::DeferredRenderPass

Public Member Functions

 DeferredPhongLightingPass ()
 Constructs a DeferredPhongLightingPass object by default.
 
void EnableLightMeshesDrawing (bool enable)
 Enables the drawing of meshes with light. More...
 
bool IsLightMeshesDrawingEnabled () const
 Checks whether the drawing of meshes with light is enabled. 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...
 
- 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...
 
virtual bool Resize (const Vector2ui &GBufferSize)
 Resizes the texture sizes. More...
 
DeferredRenderPassoperator= (const DeferredRenderPass &)=delete
 

Protected Attributes

LightUniforms m_directionalLightUniforms
 
LightUniforms m_pointSpotLightUniforms
 
MeshRef m_cone
 
MeshRef m_sphere
 
ShaderRef m_directionalLightShader
 
ShaderRef m_pointSpotLightShader
 
TextureSampler m_pointSampler
 
StaticMesh * m_coneMesh
 
StaticMesh * m_sphereMesh
 
bool m_lightMeshesDrawing
 
int m_directionalLightShaderEyePositionLocation
 
int m_directionalLightShaderSceneAmbientLocation
 
int m_pointSpotLightShaderDiscardLocation
 
int m_pointSpotLightShaderEyePositionLocation
 
int m_pointSpotLightShaderSceneAmbientLocation
 
- 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 phong lighting in deferred rendering.

Member Function Documentation

◆ EnableLightMeshesDrawing()

void Nz::DeferredPhongLightingPass::EnableLightMeshesDrawing ( bool  enable)

Enables the drawing of meshes with light.

Parameters
enableShould meshes with light parameter be drawed

◆ IsLightMeshesDrawingEnabled()

bool Nz::DeferredPhongLightingPass::IsLightMeshesDrawingEnabled ( ) const

Checks whether the drawing of meshes with light is enabled.

Returns
true If it is the case

◆ Process()

bool Nz::DeferredPhongLightingPass::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.


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