Class GeometryBufferRenderer
Hierarchy
- GeometryBufferRenderer
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new G Buffer for the scene
Parameters
-
scene: Scene
The scene the buffer belongs to
-
Optional ratio: number
How big is the buffer related to the main canvas.
Returns GeometryBufferRenderer
-
Properties
excluded Skinned Meshes From VelocitySearch playground for excludedSkinnedMeshesFromVelocity
Array used to store the ignored skinned meshes while computing velocity map (typically used by the motion blur post-process). Avoids computing bones velocities and computes only mesh's velocity itself (position, rotation, scaling).
render Transparent MeshesSearch playground for renderTransparentMeshes
Gets or sets a boolean indicating if transparent meshes should be rendered
Static Readonly DEPTHNORMAL_ TEXTURE_ TYPESearch playground for DEPTHNORMAL_TEXTURE_TYPE
Constant used to retrieve the depth + normal texture index in the G-Buffer textures array using getIndex(GeometryBufferRenderer.DEPTHNORMAL_TEXTURE_INDEX)
Static Readonly POSITION_ TEXTURE_ TYPESearch playground for POSITION_TEXTURE_TYPE
Constant used to retrieve the position texture index in the G-Buffer textures array using getIndex(GeometryBufferRenderer.POSITION_TEXTURE_INDEX)
Static Readonly REFLECTIVITY_ TEXTURE_ TYPESearch playground for REFLECTIVITY_TEXTURE_TYPE
Constant used to retrieve the reflectivity texture index in the G-Buffer textures array using the getIndex(GeometryBufferRenderer.REFLECTIVITY_TEXTURE_TYPE)
Static Readonly VELOCITY_ TEXTURE_ TYPESearch playground for VELOCITY_TEXTURE_TYPE
Constant used to retrieve the velocity texture index in the G-Buffer textures array using getIndex(GeometryBufferRenderer.VELOCITY_TEXTURE_INDEX)
Accessors
enable Position
-
Gets a boolean indicating if objects positions are enabled for the G buffer.
Returns boolean
-
Sets whether or not objects positions are enabled for the G buffer.
Parameters
-
enable: boolean
Returns any
-
enable Reflectivity
-
Gets a boolean indicating if objects roughness are enabled in the G buffer.
Returns boolean
-
Sets wether or not objects roughness are enabled for the G buffer.
Parameters
-
enable: boolean
Returns any
-
enable Velocity
-
Gets a boolean indicating if objects velocities are enabled for the G buffer.
Returns boolean
-
Sets wether or not objects velocities are enabled for the G buffer.
Parameters
-
enable: boolean
Returns any
-
is Supported
-
Gets wether or not G buffer are supported by the running hardware. This requires draw buffer supports
Returns boolean
ratio
-
Gets the ratio used by the buffer during its creation. How big is the buffer related to the main canvas.
Returns number
render List
-
Gets the render list (meshes to be rendered) used in the G buffer.
Returns Nullable<AbstractMesh[]>
-
Set the render list (meshes to be rendered) used in the G buffer.
Parameters
-
meshes: Nullable<AbstractMesh[]>
Returns any
-
samples
-
Gets the number of samples used to render the buffer (anti aliasing).
Returns number
-
Sets the number of samples used to render the buffer (anti aliasing).
Parameters
-
value: number
Returns any
-
scene
-
Gets the scene associated with the buffer.
Returns Scene
Methods
disposeSearch playground for dispose
-
Disposes the renderer and frees up associated resources.
Returns void
getGBufferSearch playground for getGBuffer
-
Gets the current underlying G Buffer.
Returns MultiRenderTarget
the buffer
get Texture IndexSearch playground for getTextureIndex
-
Returns the index of the given texture type in the G-Buffer textures array
Parameters
-
textureType: number
The texture type constant. For example GeometryBufferRenderer.POSITION_TEXTURE_INDEX
Returns number
the index of the given texture type in the G-Buffer textures array
-
is ReadySearch playground for isReady
-
Checks wether everything is ready to render a submesh to the G buffer.
Parameters
-
subMesh: SubMesh
the submesh to check readiness for
-
useInstances: boolean
is the mesh drawn using instance or not
Returns boolean
true if ready otherwise false
-
This renderer is helpfull to fill one of the render target with a geometry buffer.