Class RenderList
Rendering cache container object for the draw calls collecting, sorting and executing.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Renderer/RenderList.h
Syntax
public class RenderList : public ScriptingObject
Fields
AtmosphericFog
Atmospheric fog renderer proxy to use (only one per frame)
Declaration
public IAtmosphericFogRenderer* AtmosphericFog
Field Value
|
IAtmosphericFogRenderer
|
BatchedDrawCalls
Draw calls list with pre-batched instances (for all draw passes).
Declaration
public RenderListBuffer<BatchedDrawCall> BatchedDrawCalls
Field Value
|
RenderListBuffer<BatchedDrawCall>
|
Blendable
The blendable postFx volumes collected during frame draw calls gather pass.
Declaration
public Array<BlendableSettings> Blendable
Field Value
|
Array<BlendableSettings>
|
Decals
Decals registered for the rendering.
Declaration
public Array<RenderDecalData> Decals
Field Value
|
Array<RenderDecalData>
|
DirectionalLights
Light pass members - directional lights
Declaration
public Array<RenderDirectionalLightData> DirectionalLights
Field Value
|
Array<RenderDirectionalLightData>
|
DrawCalls
Draw calls list (for all draw passes).
Declaration
public RenderListBuffer<DrawCall> DrawCalls
Field Value
|
RenderListBuffer<DrawCall>
|
DrawCallsLists[(int32)
The draw calls lists. Each for the separate draw pass.
Declaration
public DrawCallsList DrawCallsLists[(int32) DrawCallsListType::MAX]
Field Value
|
DrawCallsList
|
EnvironmentProbes
Environment probes to use for rendering reflections
Declaration
public Array<RenderEnvironmentProbeData> EnvironmentProbes
Field Value
|
Array<RenderEnvironmentProbeData>
|
Fog
Fog renderer proxy to use (only one per frame)
Declaration
public IFogRenderer* Fog
Field Value
|
IFogRenderer
|
FrustumCornersVs
Camera frustum corners in View Space
Declaration
public Float3 FrustumCornersVs[8]
Field Value
|
Float3
|
FrustumCornersWs
Camera frustum corners in World Space
Declaration
public Float3 FrustumCornersWs[8]
Field Value
|
Float3
|
Memory
Memory storage with all draw-related data that lives during a single frame rendering time. Thread-safe to allocate memory during rendering jobs.
Declaration
public ConcurrentArenaAllocator Memory
Field Value
|
ConcurrentArenaAllocator
|
ObjectBuffer
Objects buffer that contains ShaderObjectData for each DrawCall.
Declaration
public DynamicTypedBuffer ObjectBuffer
Field Value
|
DynamicTypedBuffer
|
PointLights
Light pass members - point lights
Declaration
public RenderListBuffer<RenderPointLightData> PointLights
Field Value
|
RenderListBuffer<RenderPointLightData>
|
PostFx
Post effects to render.
Declaration
public Array<PostProcessEffect* > PostFx
Field Value
|
Array<PostProcessEffect >
|
Scenes
All scenes for rendering.
Declaration
public Array<SceneRendering* > Scenes
Field Value
|
Array<SceneRendering >
|
Settings
The post process settings.
Declaration
public PostProcessSettings Settings
Field Value
|
PostProcessSettings
|
Setup
The renderer setup for the frame drawing.
Declaration
public RenderSetup Setup
Field Value
|
RenderSetup
|
ShadowDepthDrawCallsList
The additional draw calls list for Depth drawing into Shadow Projections that use DrawCalls from main render context. This assumes that RenderContextBatch contains main context and shadow projections only.
Declaration
public DrawCallsList ShadowDepthDrawCallsList
Field Value
|
DrawCallsList
|
Sky
Sky/skybox renderer proxy to use (only one per frame)
Declaration
public ISkyRenderer* Sky
Field Value
|
ISkyRenderer
|
SkyLights
Light pass members - sky lights
Declaration
public Array<RenderSkyLightData> SkyLights
Field Value
|
Array<RenderSkyLightData>
|
SpotLights
Light pass members - spot lights
Declaration
public RenderListBuffer<RenderSpotLightData> SpotLights
Field Value
|
RenderListBuffer<RenderSpotLightData>
|
TempObjectBuffer
Temporary objects buffer that contains ShaderObjectData for each DrawCall reused during scene rendering (eg. by skybox).
Declaration
public DynamicTypedBuffer TempObjectBuffer
Field Value
|
DynamicTypedBuffer
|
VolumetricFogParticles
Local volumetric fog particles registered for the rendering.
Declaration
public RenderListBuffer<DrawCall> VolumetricFogParticles
Field Value
|
RenderListBuffer<DrawCall>
|
Methods
AddDelayedDraw(const T& lambda)
Adds custom callback (eg. lambda) to invoke after scene draw calls are collected on a main thread (some async draw tasks might be active). Allows for safe usage of GPUContext for draw preparations or to perform GPU-driven drawing.
Declaration
public void AddDelayedDraw(const T& lambda)
Parameters
|
T
lambda
|
Returns
|
void
|
Type Parameters
|
typename T
|
AddDelayedDraw(DelayedDraw&& func)
Declaration
public void AddDelayedDraw(DelayedDraw&& func)
Parameters
|
DelayedDraw
func
|
AddDrawCall(const RenderContext& renderContext, DrawPass drawModes, StaticFlags staticFlags, DrawCall& drawCall, bool receivesDecals=true, int8 sortOrder = 0)
Adds the draw call to the draw lists.
Declaration
public void AddDrawCall(const RenderContext& renderContext, DrawPass drawModes, StaticFlags staticFlags, DrawCall& drawCall, bool receivesDecals=true, int8 sortOrder = 0)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
DrawPass
drawModes
The object draw modes. |
|
StaticFlags
staticFlags
The object static flags. |
|
DrawCall
drawCall
The draw call data. |
|
bool
receivesDecals
True if the rendered mesh can receive decals. |
|
int8
sortOrder
Object sorting key. |
AddDrawCall(const RenderContextBatch& renderContextBatch, DrawPass drawModes, StaticFlags staticFlags, ShadowsCastingMode shadowsMode, const BoundingSphere& bounds, DrawCall& drawCall, bool receivesDecals=true, int8 sortOrder = 0)
Adds the draw call to the draw lists and references it in other render contexts. Performs additional per-context frustum culling.
Declaration
public void AddDrawCall(const RenderContextBatch& renderContextBatch, DrawPass drawModes, StaticFlags staticFlags, ShadowsCastingMode shadowsMode, const BoundingSphere& bounds, DrawCall& drawCall, bool receivesDecals=true, int8 sortOrder = 0)
Parameters
|
RenderContextBatch
renderContextBatch
The rendering context batch. This assumes that RenderContextBatch contains main context and shadow projections only. |
|
DrawPass
drawModes
The object draw modes. |
|
StaticFlags
staticFlags
The object static flags. |
|
ShadowsCastingMode
shadowsMode
The object shadows casting mode. |
|
BoundingSphere
bounds
The object bounds. |
|
DrawCall
drawCall
The draw call data. |
|
bool
receivesDecals
True if the rendered mesh can receive decals. |
|
int8
sortOrder
Object sorting key. |
AddSettingsBlend(IPostFxSettingsProvider* provider, float weight, int32 priority, float volumeSizeSqr)
Declaration
public void AddSettingsBlend(IPostFxSettingsProvider* provider, float weight, int32 priority, float volumeSizeSqr)
Parameters
|
IPostFxSettingsProvider
provider
|
|
float
weight
|
|
int32
priority
|
|
float
volumeSizeSqr
|
BlendSettings()
Blends the postprocessing settings into the final options.
Declaration
public void BlendSettings()
BuildObjectsBuffer()
Writes all draw calls into large objects buffer (used for random-access object data access on a GPU). Can be executed in async.
Declaration
public void BuildObjectsBuffer()
Clear()
Clear cached data
Declaration
public void Clear()
DrainDelayedDraws(RenderContextBatch& renderContextBatch, int32 contextIndex)
Declaration
public void DrainDelayedDraws(RenderContextBatch& renderContextBatch, int32 contextIndex)
Parameters
|
RenderContextBatch
renderContextBatch
|
|
int32
contextIndex
|
ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsList& list, GPUTextureView* input=nullptr)
Executes the collected draw calls.
Declaration
public void ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsList& list, GPUTextureView* input=nullptr)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
DrawCallsList
list
The collected draw calls indices list. |
|
GPUTextureView
input
The input scene color. It's optional and used in forward/postFx rendering. |
Returns
|
void
|
ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsList& list, RenderList* drawCallsList, GPUTextureView* input)
Executes the collected draw calls.
Declaration
public void ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsList& list, RenderList* drawCallsList, GPUTextureView* input)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
DrawCallsList
list
The collected draw calls indices list. |
|
RenderList
drawCallsList
The collected draw calls list owner. |
|
GPUTextureView
input
The input scene color. It's optional and used in forward/postFx rendering. |
ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsListType listType, GPUTextureView* input=nullptr)
Executes the collected draw calls.
Declaration
public void ExecuteDrawCalls(const RenderContext& renderContext, DrawCallsListType listType, GPUTextureView* input=nullptr)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
DrawCallsListType
listType
The collected draw calls list type. |
|
GPUTextureView
input
The input scene color. It's optional and used in forward/postFx rendering. |
Returns
|
void
|
HasAnyPostFx(const RenderContext& renderContext, MaterialPostFxLocation materialPostFx)
Determines whether any Material PostFx specified by given type. Used to pick a faster rendering path by the frame rendering module.
Declaration
public bool HasAnyPostFx(const RenderContext& renderContext, MaterialPostFxLocation materialPostFx) const
Parameters
|
RenderContext
renderContext
The rendering context. |
|
MaterialPostFxLocation
materialPostFx
The PostFx location to check (for materials). |
Returns
|
bool
True if render any postFx of the given type, otherwise false. |
HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess)
Determines whether any Custom PostFx specified by given type. Used to pick a faster rendering path by the frame rendering module.
Declaration
public bool HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess) const
Parameters
|
RenderContext
renderContext
The rendering context. |
|
PostProcessEffectLocation
postProcess
The PostFx location to check (for scripts). |
Returns
|
bool
True if render any postFx of the given type, otherwise false. |
HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess, MaterialPostFxLocation materialPostFx)
Determines whether any Custom PostFx or Material PostFx specified by given type. Used to pick a faster rendering path by the frame rendering module.
Declaration
public bool HasAnyPostFx(const RenderContext& renderContext, PostProcessEffectLocation postProcess, MaterialPostFxLocation materialPostFx) const
Parameters
|
RenderContext
renderContext
The rendering context. |
|
PostProcessEffectLocation
postProcess
The PostFx location to check (for scripts). |
|
MaterialPostFxLocation
materialPostFx
The PostFx location to check (for materials). |
Returns
|
bool
True if render any postFx of the given type, otherwise false. |
Init(RenderContext& renderContext)
Init cache for given task
Declaration
public void Init(RenderContext& renderContext)
Parameters
|
RenderContext
renderContext
The rendering context. |
RunCustomPostFxPass(GPUContext* context, RenderContext& renderContext, PostProcessEffectLocation location, GPUTexture*& input, GPUTexture*& output)
Runs the custom post fx pass. Uses input and output buffers as a ping pong to render all effects.
Declaration
public void RunCustomPostFxPass(GPUContext* context, RenderContext& renderContext, PostProcessEffectLocation location, GPUTexture*& input, GPUTexture*& output)
Parameters
|
GPUContext
context
The context. |
|
RenderContext
renderContext
The rendering context. |
|
PostProcessEffectLocation
location
The custom postFx location. |
|
GPUTexture
input
The input texture. |
|
GPUTexture
output
The output texture. |
RunMaterialPostFxPass(GPUContext* context, RenderContext& renderContext, MaterialPostFxLocation location, GPUTexture*& input, GPUTexture*& output)
Runs the material post fx pass. Uses input and output buffers as a ping pong to render all materials.
Declaration
public void RunMaterialPostFxPass(GPUContext* context, RenderContext& renderContext, MaterialPostFxLocation location, GPUTexture*& input, GPUTexture*& output)
Parameters
|
GPUContext
context
The context. |
|
RenderContext
renderContext
The rendering context. |
|
MaterialPostFxLocation
location
The material postFx location. |
|
GPUTexture
input
The input texture. |
|
GPUTexture
output
The output texture. |
RunPostFxPass(GPUContext* context, RenderContext& renderContext, MaterialPostFxLocation locationA, PostProcessEffectLocation locationB, GPUTexture*& inputOutput)
Runs the post fx materials pass. Uses input/output buffer to render all materials. Uses temporary render target as a ping pong buffer if required (the same format and description).
Declaration
public void RunPostFxPass(GPUContext* context, RenderContext& renderContext, MaterialPostFxLocation locationA, PostProcessEffectLocation locationB, GPUTexture*& inputOutput)
Parameters
|
GPUContext
context
The context. |
|
RenderContext
renderContext
The rendering context. |
|
MaterialPostFxLocation
locationA
The material postFx location. |
|
PostProcessEffectLocation
locationB
The custom postFx location. |
|
GPUTexture
inputOutput
The input and output texture. |
SortDrawCalls(const RenderContext& renderContext, bool reverseDistance, DrawCallsList& list, const RenderListBuffer<DrawCall>& drawCalls, DrawCallsListType listType=DrawCallsListType::GBuffer, DrawPass pass=DrawPass::All)
Sorts the collected draw calls list.
Declaration
public void SortDrawCalls(const RenderContext& renderContext, bool reverseDistance, DrawCallsList& list, const RenderListBuffer<DrawCall>& drawCalls, DrawCallsListType listType=DrawCallsListType::GBuffer, DrawPass pass=DrawPass::All)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
bool
reverseDistance
If set to |
|
DrawCallsList
list
The collected draw calls indices list. |
|
RenderListBuffer<DrawCall>
drawCalls
The collected draw calls list. |
|
DrawCallsListType
listType
The hint about draw calls list type (optional). |
|
DrawPass
pass
The draw pass (optional). |
SortDrawCalls(const RenderContext& renderContext, bool reverseDistance, DrawCallsListType listType, DrawPass pass=DrawPass::All)
Sorts the collected draw calls list.
Declaration
public void SortDrawCalls(const RenderContext& renderContext, bool reverseDistance, DrawCallsListType listType, DrawPass pass=DrawPass::All)
Parameters
|
RenderContext
renderContext
The rendering context. |
|
bool
reverseDistance
If set to |
|
DrawCallsListType
listType
The collected draw calls list type. |
|
DrawPass
pass
The draw pass (optional). |
Returns
|
void
|