Search Results for

    Show / Hide Table of Contents

    Class SceneRenderTask

    Render task which draws scene actors into the output buffer.

    Inheritance
    System.Object
    Object
    RenderTask
    SceneRenderTask
    MainRenderTask
    Inherited Members
    RenderTask.Tag
    RenderTask.OnDraw()
    RenderTask.Resize(Int32, Int32)
    RenderTask.Enabled
    RenderTask.Order
    RenderTask.FrameCount
    RenderTask.LastUsedFrame
    RenderTask.CanDraw
    RenderTask.Render
    RenderTask.Begin
    RenderTask.End
    RenderTask.Present
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class SceneRenderTask : RenderTask

    Constructors

    SceneRenderTask()

    Initializes a new instance of the SceneRenderTask.

    Declaration
    public SceneRenderTask()

    Properties

    ActorsSource

    The actors source to use (configures what objects to render).

    Declaration
    [Unmanaged]
    public ActorsSources ActorsSource { get; set; }
    Property Value
    ActorsSources

    AllowGlobalCustomPostFx

    True if allow using global custom PostFx when rendering this task.

    Declaration
    [Unmanaged]
    public bool AllowGlobalCustomPostFx { get; set; }
    Property Value
    System.Boolean

    Buffers

    The scene rendering buffers. Created and managed by the task.

    Declaration
    [Unmanaged]
    public RenderBuffers Buffers { get; }
    Property Value
    RenderBuffers

    Camera

    The scene rendering camera. Can be used to override the rendering view properties based on the current camera setup.

    Declaration
    [Unmanaged]
    public Camera Camera { get; set; }
    Property Value
    Camera

    CustomActors

    The custom set of actors to render. Used when ActorsSources.CustomActors flag is active.

    Declaration
    [Unmanaged]
    public Actor[] CustomActors { get; set; }
    Property Value
    Actor[]

    CustomScenes

    The custom set of scenes to render. Used when ActorsSources.CustomScenes flag is active.

    Declaration
    [Unmanaged]
    public Scene[] CustomScenes { get; set; }
    Property Value
    Scene[]

    IsCustomRendering

    True if the task is used for custom scene rendering and default scene drawing into output should be skipped. Enable it if you use Render event and draw scene manually.

    Declaration
    [Unmanaged]
    public bool IsCustomRendering { get; set; }
    Property Value
    System.Boolean

    Output

    The output texture (can be null if using rendering to window swap chain). Can be used to redirect the default scene rendering output to a texture.

    Declaration
    [Unmanaged]
    public GPUTexture Output { get; set; }
    Property Value
    GPUTexture

    OutputView

    Gets the rendering output view.

    Declaration
    [Unmanaged]
    public GPUTextureView OutputView { get; }
    Property Value
    GPUTextureView

    OutputViewport

    Gets the rendering output viewport (after upsampling).

    Declaration
    [Unmanaged]
    public Viewport OutputViewport { get; }
    Property Value
    Viewport

    RenderingPercentage

    The scale of the rendering resolution relative to the output dimensions. If lower than 1 the scene and postprocessing will be rendered at a lower resolution and upscaled to the output backbuffer.

    Declaration
    [Unmanaged]
    public float RenderingPercentage { get; set; }
    Property Value
    System.Single

    UpscaleLocation

    The image resolution upscale location within rendering pipeline. Unused if RenderingPercentage is 1.

    Declaration
    [Unmanaged]
    public RenderingUpscaleLocation UpscaleLocation { get; set; }
    Property Value
    RenderingUpscaleLocation

    View

    The render view description.

    Declaration
    [Unmanaged]
    public RenderView View { get; set; }
    Property Value
    RenderView

    ViewFlags

    Gets or sets the view flags (via View property).

    Declaration
    public ViewFlags ViewFlags { get; set; }
    Property Value
    ViewFlags

    ViewLayersMask

    The rendering mask for layers. Used to exclude objects from rendering (via View property).

    Declaration
    public LayersMask ViewLayersMask { get; set; }
    Property Value
    LayersMask

    ViewMode

    Gets or sets the view mode (via View property).

    Declaration
    public ViewMode ViewMode { get; set; }
    Property Value
    ViewMode

    Viewport

    Gets the rendering render task viewport (before upsampling).

    Declaration
    [Unmanaged]
    public Viewport Viewport { get; }
    Property Value
    Viewport

    Methods

    add_CollectDrawCalls(SceneRenderTask.CollectDrawCallsDelegate)

    Declaration
    public void add_CollectDrawCalls(SceneRenderTask.CollectDrawCallsDelegate value)
    Parameters
    SceneRenderTask.CollectDrawCallsDelegate value

    add_PostRender(SceneRenderTask.PostRenderDelegate)

    Declaration
    public void add_PostRender(SceneRenderTask.PostRenderDelegate value)
    Parameters
    SceneRenderTask.PostRenderDelegate value

    add_PreRender(SceneRenderTask.PreRenderDelegate)

    Declaration
    public void add_PreRender(SceneRenderTask.PreRenderDelegate value)
    Parameters
    SceneRenderTask.PreRenderDelegate value

    AddCustomActor(Actor)

    Adds the custom actor to the rendering.

    Declaration
    [Unmanaged]
    public void AddCustomActor(Actor actor)
    Parameters
    Actor actor

    The actor.

    AddCustomPostFx(PostProcessEffect)

    Adds the custom postfx to the rendering.

    Declaration
    [Unmanaged]
    public void AddCustomPostFx(PostProcessEffect fx)
    Parameters
    PostProcessEffect fx

    The postfx script.

    AddGlobalCustomPostFx(PostProcessEffect)

    Adds the custom global postfx to the rendering.

    Declaration
    [Unmanaged]
    public static void AddGlobalCustomPostFx(PostProcessEffect fx)
    Parameters
    PostProcessEffect fx

    The postfx script.

    CameraCut()

    Marks the next rendered frame as camera cut. Used to clear the temporal effects history and prevent visual artifacts blended from the previous frames.

    Declaration
    [Unmanaged]
    public void CameraCut()

    ClearCustomActors()

    Removes all the custom actors from the rendering.

    Declaration
    [Unmanaged]
    public void ClearCustomActors()

    remove_CollectDrawCalls(SceneRenderTask.CollectDrawCallsDelegate)

    Declaration
    public void remove_CollectDrawCalls(SceneRenderTask.CollectDrawCallsDelegate value)
    Parameters
    SceneRenderTask.CollectDrawCallsDelegate value

    remove_PostRender(SceneRenderTask.PostRenderDelegate)

    Declaration
    public void remove_PostRender(SceneRenderTask.PostRenderDelegate value)
    Parameters
    SceneRenderTask.PostRenderDelegate value

    remove_PreRender(SceneRenderTask.PreRenderDelegate)

    Declaration
    public void remove_PreRender(SceneRenderTask.PreRenderDelegate value)
    Parameters
    SceneRenderTask.PreRenderDelegate value

    RemoveCustomActor(Actor)

    Removes the custom actor from the rendering.

    Declaration
    [Unmanaged]
    public void RemoveCustomActor(Actor actor)
    Parameters
    Actor actor

    The actor.

    RemoveCustomPostFx(PostProcessEffect)

    Removes the custom postfx from the rendering.

    Declaration
    [Unmanaged]
    public void RemoveCustomPostFx(PostProcessEffect fx)
    Parameters
    PostProcessEffect fx

    The postfx script.

    RemoveGlobalCustomPostFx(PostProcessEffect)

    Removes the custom global postfx from the rendering.

    Declaration
    [Unmanaged]
    public static void RemoveGlobalCustomPostFx(PostProcessEffect fx)
    Parameters
    PostProcessEffect fx

    The postfx script.

    Events

    CollectDrawCalls

    The action called on view rendering to collect draw calls. It allows to extend rendering pipeline and draw custom geometry non-existing in the scene or custom actors set.

    Declaration
    [Unmanaged]
    public event SceneRenderTask.CollectDrawCallsDelegate CollectDrawCalls
    Event Type
    SceneRenderTask.CollectDrawCallsDelegate

    PostRender

    The action called after scene rendering. Can be used to render additional visual elements to the output.

    Declaration
    [Unmanaged]
    public event SceneRenderTask.PostRenderDelegate PostRender
    Event Type
    SceneRenderTask.PostRenderDelegate

    PreRender

    The action called after scene rendering. Can be used to perform custom pre-rendering or to modify the render view.

    Declaration
    [Unmanaged]
    public event SceneRenderTask.PreRenderDelegate PreRender
    Event Type
    SceneRenderTask.PreRenderDelegate

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)

    See Also

    RenderTask
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat