docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Alloc

    Alloc(int, int, int, DepthBits, GraphicsFormat, FilterMode, TextureWrapMode, TextureDimension, bool, bool, bool, bool, int, float, MSAASamples, bool, bool, RenderTextureMemoryless, VRTextureUsage, string)

    Allocate a new fixed sized RTHandle with the default RTHandle System.

    Declaration
    public static RTHandle Alloc(int width, int height, int slices = 1, DepthBits depthBufferBits = DepthBits.None, GraphicsFormat colorFormat = GraphicsFormat.R8G8B8A8_SRGB, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, TextureDimension dimension = TextureDimension.Tex2D, bool enableRandomWrite = false, bool useMipMap = false, bool autoGenerateMips = true, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, MSAASamples msaaSamples = MSAASamples.None, bool bindTextureMS = false, bool useDynamicScale = false, RenderTextureMemoryless memoryless = RenderTextureMemoryless.None, VRTextureUsage vrUsage = VRTextureUsage.None, string name = "")
    Parameters
    Type Name Description
    int width

    With of the RTHandle.

    int height

    Heigh of the RTHandle.

    int slices

    Number of slices of the RTHandle.

    DepthBits depthBufferBits

    Bit depths of a depth buffer.

    GraphicsFormat colorFormat

    GraphicsFormat of a color buffer.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    TextureDimension dimension

    Texture dimension of the RTHandle.

    bool enableRandomWrite

    Set to true to enable UAV random read writes on the texture.

    bool useMipMap

    Set to true if the texture should have mipmaps.

    bool autoGenerateMips

    Set to true to automatically generate mipmaps.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    MSAASamples msaaSamples

    Number of MSAA samples for the RTHandle.

    bool bindTextureMS

    Set to true if the texture needs to be bound as a multisampled texture in the shader.

    bool useDynamicScale

    Set to true to use hardware dynamic scaling.

    RenderTextureMemoryless memoryless

    Use this property to set the render texture memoryless modes.

    VRTextureUsage vrUsage

    Special treatment of the VR eye texture used in stereoscopic rendering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    Alloc(int, int, TextureWrapMode, TextureWrapMode, TextureWrapMode, int, DepthBits, GraphicsFormat, FilterMode, TextureDimension, bool, bool, bool, bool, int, float, MSAASamples, bool, bool, RenderTextureMemoryless, VRTextureUsage, string)

    Allocate a new fixed sized RTHandle with the default RTHandle System.

    Declaration
    public static RTHandle Alloc(int width, int height, TextureWrapMode wrapModeU, TextureWrapMode wrapModeV, TextureWrapMode wrapModeW = TextureWrapMode.Repeat, int slices = 1, DepthBits depthBufferBits = DepthBits.None, GraphicsFormat colorFormat = GraphicsFormat.R8G8B8A8_SRGB, FilterMode filterMode = FilterMode.Point, TextureDimension dimension = TextureDimension.Tex2D, bool enableRandomWrite = false, bool useMipMap = false, bool autoGenerateMips = true, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, MSAASamples msaaSamples = MSAASamples.None, bool bindTextureMS = false, bool useDynamicScale = false, RenderTextureMemoryless memoryless = RenderTextureMemoryless.None, VRTextureUsage vrUsage = VRTextureUsage.None, string name = "")
    Parameters
    Type Name Description
    int width

    With of the RTHandle.

    int height

    Heigh of the RTHandle.

    TextureWrapMode wrapModeU

    U coordinate wrapping mode of the RTHandle.

    TextureWrapMode wrapModeV

    V coordinate wrapping mode of the RTHandle.

    TextureWrapMode wrapModeW

    W coordinate wrapping mode of the RTHandle.

    int slices

    Number of slices of the RTHandle.

    DepthBits depthBufferBits

    Bit depths of a depth buffer.

    GraphicsFormat colorFormat

    GraphicsFormat of a color buffer.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureDimension dimension

    Texture dimension of the RTHandle.

    bool enableRandomWrite

    Set to true to enable UAV random read writes on the texture.

    bool useMipMap

    Set to true if the texture should have mipmaps.

    bool autoGenerateMips

    Set to true to automatically generate mipmaps.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    MSAASamples msaaSamples

    Number of MSAA samples for the RTHandle.

    bool bindTextureMS

    Set to true if the texture needs to be bound as a multisampled texture in the shader.

    bool useDynamicScale

    Set to true to use hardware dynamic scaling.

    RenderTextureMemoryless memoryless

    Use this property to set the render texture memoryless modes.

    VRTextureUsage vrUsage

    Special treatment of the VR eye texture used in stereoscopic rendering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    Alloc(in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)

    Allocate a new fixed sized RTHandle with the default RTHandle System.

    Declaration
    public static RTHandle Alloc(in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
    Parameters
    Type Name Description
    RenderTextureDescriptor descriptor

    RenderTexture descriptor of the RTHandle.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    A new RTHandle.

    Alloc(Vector2, int, DepthBits, GraphicsFormat, FilterMode, TextureWrapMode, TextureDimension, bool, bool, bool, bool, int, float, MSAASamples, bool, bool, RenderTextureMemoryless, VRTextureUsage, string)

    Allocate a new automatically sized RTHandle for the default RTHandle System.

    Declaration
    public static RTHandle Alloc(Vector2 scaleFactor, int slices = 1, DepthBits depthBufferBits = DepthBits.None, GraphicsFormat colorFormat = GraphicsFormat.R8G8B8A8_SRGB, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, TextureDimension dimension = TextureDimension.Tex2D, bool enableRandomWrite = false, bool useMipMap = false, bool autoGenerateMips = true, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, MSAASamples msaaSamples = MSAASamples.None, bool bindTextureMS = false, bool useDynamicScale = false, RenderTextureMemoryless memoryless = RenderTextureMemoryless.None, VRTextureUsage vrUsage = VRTextureUsage.None, string name = "")
    Parameters
    Type Name Description
    Vector2 scaleFactor

    Constant scale for the RTHandle size computation.

    int slices

    Number of slices of the RTHandle.

    DepthBits depthBufferBits

    Bit depths of a depth buffer.

    GraphicsFormat colorFormat

    GraphicsFormat of a color buffer.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    TextureDimension dimension

    Texture dimension of the RTHandle.

    bool enableRandomWrite

    Set to true to enable UAV random read writes on the texture.

    bool useMipMap

    Set to true if the texture should have mipmaps.

    bool autoGenerateMips

    Set to true to automatically generate mipmaps.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    MSAASamples msaaSamples

    Number of MSAA samples.

    bool bindTextureMS

    Set to true if the texture needs to be bound as a multisampled texture in the shader.

    bool useDynamicScale

    Set to true to use hardware dynamic scaling.

    RenderTextureMemoryless memoryless

    Use this property to set the render texture memoryless modes.

    VRTextureUsage vrUsage

    Special treatment of the VR eye texture used in stereoscopic rendering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    A new RTHandle.

    Alloc(Vector2, in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)

    Allocate a new automatically sized RTHandle for the default RTHandle System.

    Declaration
    public static RTHandle Alloc(Vector2 scaleFactor, in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
    Parameters
    Type Name Description
    Vector2 scaleFactor

    Constant scale for the RTHandle size computation.

    RenderTextureDescriptor descriptor

    RenderTexture descriptor of the RTHandle.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    A new RTHandle.

    Alloc(ScaleFunc, int, DepthBits, GraphicsFormat, FilterMode, TextureWrapMode, TextureDimension, bool, bool, bool, bool, int, float, MSAASamples, bool, bool, RenderTextureMemoryless, VRTextureUsage, string)

    Allocate a new automatically sized RTHandle for the default RTHandle System.

    Declaration
    public static RTHandle Alloc(ScaleFunc scaleFunc, int slices = 1, DepthBits depthBufferBits = DepthBits.None, GraphicsFormat colorFormat = GraphicsFormat.R8G8B8A8_SRGB, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, TextureDimension dimension = TextureDimension.Tex2D, bool enableRandomWrite = false, bool useMipMap = false, bool autoGenerateMips = true, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, MSAASamples msaaSamples = MSAASamples.None, bool bindTextureMS = false, bool useDynamicScale = false, RenderTextureMemoryless memoryless = RenderTextureMemoryless.None, VRTextureUsage vrUsage = VRTextureUsage.None, string name = "")
    Parameters
    Type Name Description
    ScaleFunc scaleFunc

    Function used for the RTHandle size computation.

    int slices

    Number of slices of the RTHandle.

    DepthBits depthBufferBits

    Bit depths of a depth buffer.

    GraphicsFormat colorFormat

    GraphicsFormat of a color buffer.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    TextureDimension dimension

    Texture dimension of the RTHandle.

    bool enableRandomWrite

    Set to true to enable UAV random read writes on the texture.

    bool useMipMap

    Set to true if the texture should have mipmaps.

    bool autoGenerateMips

    Set to true to automatically generate mipmaps.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    MSAASamples msaaSamples

    Number of MSAA samples.

    bool bindTextureMS

    Set to true if the texture needs to be bound as a multisampled texture in the shader.

    bool useDynamicScale

    Set to true to use hardware dynamic scaling.

    RenderTextureMemoryless memoryless

    Use this property to set the render texture memoryless modes.

    VRTextureUsage vrUsage

    Special treatment of the VR eye texture used in stereoscopic rendering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    Alloc(ScaleFunc, in RenderTextureDescriptor, FilterMode, TextureWrapMode, bool, int, float, string)

    Allocate a new automatically sized RTHandle for the default RTHandle System.

    Declaration
    public static RTHandle Alloc(ScaleFunc scaleFunc, in RenderTextureDescriptor descriptor, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Repeat, bool isShadowMap = false, int anisoLevel = 1, float mipMapBias = 0, string name = "")
    Parameters
    Type Name Description
    ScaleFunc scaleFunc

    Function used for the RTHandle size computation.

    RenderTextureDescriptor descriptor

    RenderTexture descriptor of the RTHandle.

    FilterMode filterMode

    Filtering mode of the RTHandle.

    TextureWrapMode wrapMode

    Addressing mode of the RTHandle.

    bool isShadowMap

    Set to true if the depth buffer should be used as a shadow map.

    int anisoLevel

    Anisotropic filtering level.

    float mipMapBias

    Bias applied to mipmaps during filtering.

    string name

    Name of the RTHandle.

    Returns
    Type Description
    RTHandle

    A new RTHandle.

    Alloc(Texture)

    Allocate a RTHandle from a regular Texture for the default RTHandle system.

    Declaration
    public static RTHandle Alloc(Texture tex)
    Parameters
    Type Name Description
    Texture tex

    Input texture

    Returns
    Type Description
    RTHandle

    A new RTHandle referencing the input texture.

    Alloc(RenderTexture)

    Allocate a RTHandle from a regular RenderTexture for the default RTHandle system.

    Declaration
    public static RTHandle Alloc(RenderTexture tex)
    Parameters
    Type Name Description
    RenderTexture tex

    Input texture

    Returns
    Type Description
    RTHandle

    A new RTHandle referencing the input texture.

    Alloc(RenderTargetIdentifier)

    Allocate a RTHandle from a regular render target identifier for the default RTHandle system.

    Declaration
    public static RTHandle Alloc(RenderTargetIdentifier tex)
    Parameters
    Type Name Description
    RenderTargetIdentifier tex

    Input render target identifier.

    Returns
    Type Description
    RTHandle

    A new RTHandle referencing the input render target identifier.

    Alloc(RenderTargetIdentifier, string)

    Allocate a RTHandle from a regular render target identifier for the default RTHandle system.

    Declaration
    public static RTHandle Alloc(RenderTargetIdentifier tex, string name)
    Parameters
    Type Name Description
    RenderTargetIdentifier tex

    Input render target identifier.

    string name

    Name of the render target.

    Returns
    Type Description
    RTHandle

    A new RTHandle referencing the input render target identifier.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)