Class RenderBuffers
The scene rendering buffers container.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class RenderBuffers : Object
Constructors
RenderBuffers()
Properties
AspectRatio
Gets the buffers aspect ratio.
Declaration
[Unmanaged]
public float AspectRatio { get; }
Property Value
|
System.Single
|
DepthBuffer
Gets the depth buffer render target allocated within this render buffers collection (read only).
Declaration
[Unmanaged]
public GPUTexture DepthBuffer { get; }
Property Value
|
GPUTexture
|
GBuffer0
Gets the GBuffer texture 0. RGB: Color, A: AO
Declaration
[Unmanaged]
public GPUTexture GBuffer0 { get; }
Property Value
|
GPUTexture
|
GBuffer1
Gets the GBuffer texture 1. RGB: Normal, A: ShadingModel
Declaration
[Unmanaged]
public GPUTexture GBuffer1 { get; }
Property Value
|
GPUTexture
|
GBuffer2
Gets the GBuffer texture 2. R: Roughness, G: Metalness, B:Specular
Declaration
[Unmanaged]
public GPUTexture GBuffer2 { get; }
Property Value
|
GPUTexture
|
GBuffer3
Gets the GBuffer texture 3. RGBA: Custom Data
Declaration
[Unmanaged]
public GPUTexture GBuffer3 { get; }
Property Value
|
GPUTexture
|
Height
Gets the buffers height (in pixels).
Declaration
[Unmanaged]
public int Height { get; }
Property Value
|
System.Int32
|
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
[Unmanaged]
public RenderBuffers LinkedCustomBuffers { get; set; }
Property Value
|
RenderBuffers
|
MotionVectors
Gets the motion vectors render target allocated within this render buffers collection (read only).
Declaration
[Unmanaged]
public GPUTexture MotionVectors { get; }
Property Value
|
GPUTexture
|
Remarks
Texture ca be null or not initialized if motion blur is disabled or not yet rendered.
OcclusionCulling
Occlusion culling implementation (optional). Can skip drawing occluded objects. Maintains a state synchronized with scene rendering with container RenderBuffers.
Declaration
[Unmanaged]
public IOcclusionCulling OcclusionCulling { get; }
Property Value
|
IOcclusionCulling
|
OutputFormat
Gets the output buffers format (R11G11B10 or R16G16B16A16 depending on UseAlpha property).
Declaration
[Unmanaged]
public PixelFormat OutputFormat { get; }
Property Value
|
PixelFormat
|
Size
Gets the buffers width and height (in pixels).
Declaration
[Unmanaged]
public Float2 Size { get; }
Property Value
|
Float2
|
UseAlpha
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
[Unmanaged]
public bool UseAlpha { get; set; }
Property Value
|
System.Boolean
|
Viewport
Gets the buffers rendering viewport.
Declaration
[Unmanaged]
public Viewport Viewport { get; }
Property Value
|
Viewport
|
Width
Gets the buffers width (in pixels).
Declaration
[Unmanaged]
public int Width { get; }
Property Value
|
System.Int32
|
Methods
Init(Int32, Int32)
Allocates the buffers.
Declaration
[Unmanaged]
public bool Init(int width, int height)
Parameters
|
System.Int32
width
The surface width (in pixels). |
|
System.Int32
height
The surface height (in pixels). |
Returns
|
System.Boolean
True if cannot allocate buffers, otherwise false. |
Release()
Release the buffers data.
Declaration
[Unmanaged]
public void Release()