LPRenderingSystem
in package
implements
SystemInterface, DevEntityPickerRenderInterface
Table of Contents
Interfaces
Constants
- DEBUG_MODE_ALBEDO = 5
- DEBUG_MODE_DEPTH = 4
- DEBUG_MODE_NONE = 0
- Rendering debug mode
- DEBUG_MODE_NORMALS = 3
- DEBUG_MODE_POSITION = 1
- DEBUG_MODE_SSAO = 6
- DEBUG_MODE_VIEW_POSITION = 2
Properties
- $debugMode : int
- $currentRenderTargetRes : RenderTargetResource|null
- The render target the renderer should render to
- $devPickingShader : ShaderProgram
- $fullscreenDebugDepthRenderer : FullscreenDebugDepthRenderer
- Fullscreen Debug Depth Renderer
- $fullscreenRenderer : FullscreenTextureRenderer
- Fullscreen Texture Debug Renderer
- $geometryRenderers : array<string|int, GBufferGeometryPassInterface>
- Array of geometry renderers, these are beeing invoked to generate the GBuffer
- $gl : GLState
- $lightingShader : ShaderProgram
- $modelCollection : LPModelCollection
- $objectShader : ShaderProgram
- Shader programs
- $shaders : ShaderCollection
- $ssaoRenderer : SSAORenderer
- Screen Space Ambient Occlusion (SSAO) Renderer
Methods
- __construct() : mixed
- Constructor
- addGeometryRenderer() : void
- Adds a geometry renderer to the system
- register() : void
- Registers the system, this is where you should register all required components.
- render() : void
- Handles rendering of the scene, here you can attach additional render passes, modify the render pipeline or customize rendering related data.
- renderEntityIdsForPicking() : void
- Renders all entites to a picking framebuffer
- setRenderTarget() : void
- Sets the render target the renderer should render to !!! This has to be called every frame before calling render() !!!
- unregister() : void
- Unregisters the system, this is where you can handle any cleanup.
- update() : void
- Updates handler, this is where the game state should be updated.
Constants
DEBUG_MODE_ALBEDO
public
mixed
DEBUG_MODE_ALBEDO
= 5
DEBUG_MODE_DEPTH
public
mixed
DEBUG_MODE_DEPTH
= 4
DEBUG_MODE_NONE
Rendering debug mode
public
mixed
DEBUG_MODE_NONE
= 0
DEBUG_MODE_NORMALS
public
mixed
DEBUG_MODE_NORMALS
= 3
DEBUG_MODE_POSITION
public
mixed
DEBUG_MODE_POSITION
= 1
DEBUG_MODE_SSAO
public
mixed
DEBUG_MODE_SSAO
= 6
DEBUG_MODE_VIEW_POSITION
public
mixed
DEBUG_MODE_VIEW_POSITION
= 2
Properties
$debugMode
public
int
$debugMode
= self::DEBUG_MODE_NONE
$currentRenderTargetRes
The render target the renderer should render to
private
RenderTargetResource|null
$currentRenderTargetRes
= null
$devPickingShader
private
ShaderProgram
$devPickingShader
$fullscreenDebugDepthRenderer
Fullscreen Debug Depth Renderer
private
FullscreenDebugDepthRenderer
$fullscreenDebugDepthRenderer
$fullscreenRenderer
Fullscreen Texture Debug Renderer
private
FullscreenTextureRenderer
$fullscreenRenderer
$geometryRenderers
Array of geometry renderers, these are beeing invoked to generate the GBuffer
private
array<string|int, GBufferGeometryPassInterface>
$geometryRenderers
= []
$gl
private
GLState
$gl
$lightingShader
private
ShaderProgram
$lightingShader
$modelCollection
private
LPModelCollection
$modelCollection
$objectShader
Shader programs
private
ShaderProgram
$objectShader
$shaders
private
ShaderCollection
$shaders
$ssaoRenderer
Screen Space Ambient Occlusion (SSAO) Renderer
private
SSAORenderer
$ssaoRenderer
Methods
__construct()
Constructor
public
__construct(GLState $gl, ShaderCollection $shaders, LPModelCollection $modelCollection) : mixed
Parameters
- $gl : GLState
- $shaders : ShaderCollection
- $modelCollection : LPModelCollection
addGeometryRenderer()
Adds a geometry renderer to the system
public
addGeometryRenderer(GBufferGeometryPassInterface $renderer) : void
Parameters
- $renderer : GBufferGeometryPassInterface
register()
Registers the system, this is where you should register all required components.
public
register(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface
render()
Handles rendering of the scene, here you can attach additional render passes, modify the render pipeline or customize rendering related data.
public
render(EntitiesInterface $entities, RenderContext $context) : void
Parameters
- $entities : EntitiesInterface
- $context : RenderContext
renderEntityIdsForPicking()
Renders all entites to a picking framebuffer
public
renderEntityIdsForPicking(EntitiesInterface $entities, CameraData $cameraData) : void
Parameters
- $entities : EntitiesInterface
- $cameraData : CameraData
setRenderTarget()
Sets the render target the renderer should render to !!! This has to be called every frame before calling render() !!!
public
setRenderTarget(RenderTargetResource $renderTargetRes) : void
Parameters
- $renderTargetRes : RenderTargetResource
unregister()
Unregisters the system, this is where you can handle any cleanup.
public
unregister(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface
update()
Updates handler, this is where the game state should be updated.
public
update(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface