Class RenderBuffers
The scene rendering buffers container.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Graphics/RenderBuffers.h
Syntax
public class RenderBuffers : public ScriptingObject
Constructors
~RenderBuffers()
Fields
_aspectRatio
Declaration
protected float _aspectRatio = 0.0f
Field Value
|
float
|
_height
Declaration
protected int32 _height = 0
Field Value
|
int32
|
_resources
Declaration
protected Array<GPUTexture* , FixedAllocation<32>> _resources
Field Value
|
Array<GPUTexture , FixedAllocation<32>>
|
_useAlpha
Declaration
protected bool _useAlpha = false
Field Value
|
bool
|
_viewport
_width
Declaration
protected int32 _width = 0
Field Value
|
int32
|
CustomBuffers
Declaration
public Array<CustomBuffer* , HeapAllocation> CustomBuffers
Field Value
|
Array<CustomBuffer , HeapAllocation>
|
DepthBuffer
Gets the depth buffer render target allocated within this render buffers collection (read only).
Declaration
public GPUTexture* DepthBuffer
Field Value
|
GPUTexture
|
GBuffer
GBuffer0
Gets the GBuffer texture 0. RGB: Color, A: AO
Declaration
public GPUTexture* GBuffer0
Field Value
|
GPUTexture
|
GBuffer1
Gets the GBuffer texture 1. RGB: Normal, A: ShadingModel
Declaration
public GPUTexture* GBuffer1
Field Value
|
GPUTexture
|
GBuffer2
Gets the GBuffer texture 2. R: Roughness, G: Metalness, B:Specular
Declaration
public GPUTexture* GBuffer2
Field Value
|
GPUTexture
|
GBuffer3
Gets the GBuffer texture 3. RGBA: Custom Data
Declaration
public GPUTexture* GBuffer3
Field Value
|
GPUTexture
|
HalfResDepth
LastEyeAdaptationTime
Declaration
public float LastEyeAdaptationTime = 0.0f
Field Value
|
float
|
LastFrameHalfResDepth
Declaration
public uint64 LastFrameHalfResDepth = 0
Field Value
|
uint64
|
LastFrameLuminanceMap
Declaration
public uint64 LastFrameLuminanceMap = 0
Field Value
|
uint64
|
LastFrameTemporalAA
Declaration
public uint64 LastFrameTemporalAA = 0
Field Value
|
uint64
|
LastFrameTemporalSSR
Declaration
public uint64 LastFrameTemporalSSR = 0
Field Value
|
uint64
|
LastFrameVolumetricFog
Declaration
public uint64 LastFrameVolumetricFog = 0
Field Value
|
uint64
|
LinkedCustomBuffers
External Render Buffers used to redirect FindCustomBuffer/GetCustomBuffer calls. Can be linked to other rendering task (eg. main game viewport) to reuse graphics effect state from it (eg. use GI from main game view in in-game camera renderer).
Declaration
public RenderBuffers* LinkedCustomBuffers = nullptr
Field Value
|
RenderBuffers
|
LocalShadowedLightScattering
LuminanceMap
MaxDistance
Declaration
public float MaxDistance
Field Value
|
float
|
MotionVectors
Gets the motion vectors render target allocated within this render buffers collection (read only).
Texture ca be null or not initialized if motion blur is disabled or not yet rendered.
Declaration
public GPUTexture* MotionVectors
Field Value
|
GPUTexture
|
TemporalAA
TemporalSSR
VolumetricFog
VolumetricFogData
Declaration
public struct RenderBuffers::@144 VolumetricFogData
Field Value
|
struct RenderBuffers::@144
|
VolumetricFogHistory
Methods
FindCustomBuffer(const StringView& name, bool withLinked=true)
Declaration
public CustomBuffer* FindCustomBuffer(const StringView& name, bool withLinked=true) const
Parameters
|
StringView
name
|
|
bool
withLinked
|
Returns
|
CustomBuffer
|
GetAspectRatio()
Gets the buffers aspect ratio.
Declaration
public float GetAspectRatio() const
Returns
|
float
|
GetCustomBuffer(const StringView& name, bool withLinked=true)
Declaration
public T* GetCustomBuffer(const StringView& name, bool withLinked=true)
Parameters
|
StringView
name
|
|
bool
withLinked
|
Returns
|
T
|
Type Parameters
|
class T
|
GetHeight()
Gets the buffers height (in pixels).
Declaration
public int32 GetHeight() const
Returns
|
int32
|
GetMemoryUsage()
Gets the current GPU memory usage by all the buffers (in bytes).
Declaration
public uint64 GetMemoryUsage() const
Returns
|
uint64
|
GetOutputFormat()
Gets the output buffers format (R11G11B10 or R16G16B16A16 depending on UseAlpha property).
Declaration
public PixelFormat GetOutputFormat() const
Returns
|
PixelFormat
|
GetSize()
Gets the buffers width and height (in pixels).
Declaration
public Float2 GetSize() const
Returns
|
Float2
|
GetUseAlpha()
True if support alpha output in the rendering buffers and pass-though alpha mask of the scene during rendering (at cost of reduced performance).
Declaration
public bool GetUseAlpha() const
Returns
|
bool
|
GetViewport()
Gets the buffers rendering viewport.
Declaration
public Viewport GetViewport() const
Returns
|
Viewport
|
GetWidth()
Gets the buffers width (in pixels).
Declaration
public int32 GetWidth() const
Returns
|
int32
|
Init(int32 width, int32 height)
Allocates the buffers.
Declaration
public bool Init(int32 width, int32 height)
Parameters
|
int32
width
The surface width (in pixels). |
|
int32
height
The surface height (in pixels). |
Returns
|
bool
True if cannot allocate buffers, otherwise false. |
Release()
Release the buffers data.
Declaration
public void Release()
ReleaseUnusedMemory()
Frees unused buffers to reduce memory usage for certain drawing effects that are state-dependant but unused for multiple frames.
Declaration
public void ReleaseUnusedMemory()
RequestHalfResDepth(GPUContext* context)
Requests the half-resolution depth to be prepared for the current frame.
Declaration
public GPUTexture* RequestHalfResDepth(GPUContext* context)
Parameters
|
GPUContext
context
The context. |
Returns
|
GPUTexture
The half-res depth buffer. |
SetUseAlpha(bool value)
True if support alpha output in the rendering buffers and pass-though alpha mask of the scene during rendering (at cost of reduced performance).
Declaration
public void SetUseAlpha(bool value)
Parameters
|
bool
value
|