Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CForwardRP Class Reference

This object class will perform draw commands using "Forwarder rendering". More...

#include <RenderPipeline/CForwardRP.h>

Inheritance diagram for Skylicht::CForwardRP:
Skylicht::CBaseRP Skylicht::IRenderPipeline

Public Member Functions

 CForwardRP (bool linearRGB=true, bool useEmission=true)
virtual void initRender (int w, int h)
virtual void resize (int w, int h)
virtual void render (ITexture *target, CCamera *camera, CEntityManager *entityManager, const core::recti &viewport, int cubeFaceId=-1, IRenderPipeline *lastRP=NULL)
void setPostProcessor (IPostProcessor *pp)
ITexturegetEmissionTexture ()
Public Member Functions inherited from Skylicht::CBaseRP
virtual bool canRenderMaterial (CMaterial *m)
virtual bool canRenderShader (CShader *s)
virtual void setCamera (CCamera *camera)
virtual void setNextPipeLine (IRenderPipeline *next)
virtual void onNext (ITexture *target, CCamera *camera, CEntityManager *entity, const core::recti &vp, int cubeFaceId)
virtual void drawMeshBuffer (CMesh *mesh, int bufferID, CEntityManager *entity, int entityID, bool skinnedMesh)
virtual void drawInstancingMeshBuffer (CMesh *mesh, int bufferID, CShader *instancingShader, CEntityManager *entityMgr, int entityID, bool skinnedMesh)
virtual void updateTextureResource (CMesh *mesh, int bufferID, CEntityManager *entity, int entityID, bool skinnedMesh)
virtual void updateShaderResource (CShader *shader, CEntityManager *entity, int entityID, video::SMaterial &irrMaterial)
void beginRender2D (float w, float h)
void renderBufferToTarget (float sx, float sy, float sw, float sh, SMaterial &material, bool flipY=true, bool flipX=false)
void renderBufferToTarget (float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh, SMaterial &material, bool flipY=true, bool flipX=false)
void renderEnvironment (CCamera *camera, CEntityManager *entityMgr, const core::vector3df &position, ITexture *texture[], int *face, int numFace, bool allPipeline)
void renderCubeEnvironment (CCamera *camera, CEntityManager *entityMgr, const core::vector3df &position, ITexture *texture, int *face, int numFace, bool allPipeline)
void unbindRTT ()
Public Member Functions inherited from Skylicht::IRenderPipeline
virtual ERenderPipelineType getType ()
virtual void render (ITexture *target, CCamera *camera, CEntityManager *entity, const core::recti &viewport, int cubeFaceId=-1, IRenderPipeline *lastRP=NULL)=0
virtual void onNext (ITexture *target, CCamera *camera, CEntityManager *entity, const core::recti &viewport, int cubeFaceId)=0

Protected Member Functions

void initRTT (int w, int h)
void releaseRTT ()
Protected Member Functions inherited from Skylicht::CBaseRP
void disableTextureBilinear (SMaterial &m, int slot)
void enableTextureBilinear (SMaterial &m, int slot)
void setTarget (ITexture *target, int faceId)
void drawSceneToTexture (ITexture *target, CCamera *camera, CEntityManager *entityMgr, bool allPipeline)
void drawSceneToCubeTexture (ITexture *target, CCamera *camera, video::E_CUBEMAP_FACE faceID, CEntityManager *entityMgr, bool allPipeline)

Protected Attributes

bool m_useLinearRGB
bool m_useEmission
ITexturem_target
ITexturem_emission
core::dimension2du m_size
IPostProcessorm_postProcessor
SMaterial m_finalPass
Protected Attributes inherited from Skylicht::CBaseRP
IRenderPipeline * m_next
CMeshBuffer< video::S3DVertex2TCoords > * m_drawBuffer
IVertexBufferm_verticesImage
IIndexBufferm_indicesImage
float m_viewport2DW
float m_viewport2DH
SMaterial m_unbindMaterial
int m_textureColorShaderID
Protected Attributes inherited from Skylicht::IRenderPipeline
ERenderPipelineType m_type

Additional Inherited Members

Public Types inherited from Skylicht::IRenderPipeline
enum  ERenderPipelineType { Forwarder , Deferred , ShadowMap , Mix }
Static Public Member Functions inherited from Skylicht::CBaseRP
static void saveFBOToFile (ITexture *texture, const char *output)
static void setBakeMode (bool b)
static void setBakeLightmapMode (bool b)
static void setBakeLightingMapBounce (u32 i)
static void setClearColor (const SColor &c)
static void setMaxLight (u32 maxLights)
Public Attributes inherited from Skylicht::IRenderPipeline
std::function< void(IRenderPipeline *)> OnFinish
Static Protected Attributes inherited from Skylicht::CBaseRP
static bool s_bakeMode
static bool s_bakeLMMode
static u32 s_bakeBounce
static u32 s_maxLight
static SColor s_clearColor

Detailed Description

This object class will perform draw commands using "Forwarder rendering".

This is the most basic rendering style, where lighting is calculated directly from the shader. Because of this, forward shaders generally only support one directional light (CDirectionalLight). Any other complex lighting is baked into a lightmap, and the shader computes all the visual output.

See also
CShadowMapRP, CDeferredRP

Member Function Documentation

◆ initRender()

virtual void Skylicht::CForwardRP::initRender ( int w,
int h )
virtual

◆ render()

virtual void Skylicht::CForwardRP::render ( ITexture * target,
CCamera * camera,
CEntityManager * entityManager,
const core::recti & viewport,
int cubeFaceId = -1,
IRenderPipeline * lastRP = NULL )
virtual

Implements Skylicht::CBaseRP.

◆ resize()

virtual void Skylicht::CForwardRP::resize ( int w,
int h )
virtual

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