docs.unity3d.com
    显示 / 隐藏目录

    Class CompositeRenderContext

    The settings used to render the view for the composite context from the CompositeRenderModule.

    Inheritance
    Object
    CompositeRenderContext
    Namespace: Unity.MARS
    Syntax
    public class CompositeRenderContext : IDisposable

    Constructors

    CompositeRenderContext(ContextViewType, Camera, RenderTextureDescriptor, Color, LayerMask, Boolean, Boolean, Boolean, Boolean)

    Creates a new composite render context for a given view.

    Declaration
    public CompositeRenderContext(ContextViewType contextViewType, Camera targetCamera, RenderTextureDescriptor cameraTargetDescriptor, Color backgroundColor, LayerMask compositeLayerMask, bool showImageEffects = false, bool backgroundSceneActive = false, bool desaturateComposited = false, bool useXRay = true)
    Parameters
    Type Name Description
    ContextViewType contextViewType

    What type of view is the target.

    Camera targetCamera

    The camera that renders the view

    RenderTextureDescriptor cameraTargetDescriptor

    the render texture descriptor for the target cameras render texture

    Color backgroundColor

    The background color for compositing the view.

    LayerMask compositeLayerMask

    Layer mask for the composite objects.

    Boolean showImageEffects

    Show image effects in the view.

    Boolean backgroundSceneActive

    Is the background of the composite the target camera scene

    Boolean desaturateComposited

    Desaturate the composited cameras output.

    Boolean useXRay

    Is the x-ray shader in use in the view.

    Properties

    BackgroundClearFlag

    Declaration
    public CameraClearFlags BackgroundClearFlag { get; set; }
    Property Value
    Type Description
    CameraClearFlags

    CompositeCamera

    The composite camera being used in the context

    Declaration
    public Camera CompositeCamera { get; }
    Property Value
    Type Description
    Camera

    CompositeCameraTexture

    Declaration
    public RenderTexture CompositeCameraTexture { get; }
    Property Value
    Type Description
    RenderTexture

    CompositeLayerMask

    The LayerMask for the background layer of the composite. This is also the layer any image effects will use in the composite.

    Declaration
    public LayerMask CompositeLayerMask { get; set; }
    Property Value
    Type Description
    LayerMask

    ContextViewType

    Type of view the context is being used with

    Declaration
    public ContextViewType ContextViewType { get; }
    Property Value
    Type Description
    ContextViewType

    DesaturateComposited

    Whether to desaturate the composite camera's texture when compositing.

    Declaration
    public bool DesaturateComposited { get; set; }
    Property Value
    Type Description
    Boolean

    IsBaseSceneView

    Declaration
    public bool IsBaseSceneView { get; }
    Property Value
    Type Description
    Boolean

    ShowImageEffects

    Show image effects in the View

    Declaration
    public bool ShowImageEffects { get; set; }
    Property Value
    Type Description
    Boolean

    TargetCamera

    The camera that is the target of the compositing in the context

    Declaration
    public Camera TargetCamera { get; }
    Property Value
    Type Description
    Camera

    UseCompositeCamera

    Declaration
    public bool UseCompositeCamera { get; }
    Property Value
    Type Description
    Boolean

    UseXRay

    Use the X-Ray wall cut away in the view.

    Declaration
    public bool UseXRay { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    AssignCameraToSimulation()

    Assigns the cameras in a composite context to the simulation.

    Declaration
    public void AssignCameraToSimulation()

    Dispose()

    Declaration
    public void Dispose()

    SetBackgroundColor(Color)

    Sets the background color for the composite.

    Declaration
    public void SetBackgroundColor(Color color)
    Parameters
    Type Name Description
    Color color

    Color to use as a background color.

    SetBackgroundSceneActive(Boolean)

    Sets whether the background scene of the composite should be active. Used for scene picking in a scene view.

    Declaration
    public void SetBackgroundSceneActive(bool backgroundSceneActive)
    Parameters
    Type Name Description
    Boolean backgroundSceneActive

    Should the background be the active scene

    SetTargetCamera(Camera)

    Sets the target camera for the context.

    Declaration
    public void SetTargetCamera(Camera targetCamera)
    Parameters
    Type Name Description
    Camera targetCamera

    Camera to use as the Target Camera for the context.

    Events

    BeforeCompositeCameraUpdate

    Called right before the composite camera updates from the target camera

    Declaration
    public event Action BeforeCompositeCameraUpdate
    Event Type
    Type Description
    Action
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)