docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TextureDesc

    Descriptor used to create texture resources

    Inherited Members
    ValueType.Equals(object)
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public struct TextureDesc

    Constructors

    TextureDesc(int, int, bool, bool)

    TextureDesc constructor for a texture using explicit size

    Declaration
    public TextureDesc(int width, int height, bool dynamicResolution = false, bool xrReady = false)
    Parameters
    Type Name Description
    int width

    Texture width

    int height

    Texture height

    bool dynamicResolution

    Use dynamic resolution

    bool xrReady

    Set this to true if the Texture is a render texture in an XR setting.

    TextureDesc(TextureDesc)

    Copy constructor

    Declaration
    public TextureDesc(TextureDesc input)
    Parameters
    Type Name Description
    TextureDesc input

    TextureDesc(ScaleFunc, bool, bool)

    TextureDesc constructor for a texture using a functor for scaling

    Declaration
    public TextureDesc(ScaleFunc func, bool dynamicResolution = false, bool xrReady = false)
    Parameters
    Type Name Description
    ScaleFunc func

    Function used to determnine the texture size

    bool dynamicResolution

    Use dynamic resolution

    bool xrReady

    Set this to true if the Texture is a render texture in an XR setting.

    TextureDesc(Vector2, bool, bool)

    TextureDesc constructor for a texture using a fixed scaling

    Declaration
    public TextureDesc(Vector2 scale, bool dynamicResolution = false, bool xrReady = false)
    Parameters
    Type Name Description
    Vector2 scale

    RTHandle scale used for this texture

    bool dynamicResolution

    Use dynamic resolution

    bool xrReady

    Set this to true if the Texture is a render texture in an XR setting.

    Fields

    anisoLevel

    Anisotropic filtering level.

    Declaration
    public int anisoLevel
    Field Value
    Type Description
    int

    autoGenerateMips

    Automatically generate mip maps.

    Declaration
    public bool autoGenerateMips
    Field Value
    Type Description
    bool

    bindTextureMS

    Bind texture multi sampled.

    Declaration
    public bool bindTextureMS
    Field Value
    Type Description
    bool

    clearBuffer

    Texture needs to be cleared on first use.

    Declaration
    public bool clearBuffer
    Field Value
    Type Description
    bool

    clearColor

    Clear color.

    Declaration
    public Color clearColor
    Field Value
    Type Description
    Color

    colorFormat

    Color format.

    Declaration
    public GraphicsFormat colorFormat
    Field Value
    Type Description
    GraphicsFormat

    depthBufferBits

    Depth buffer bit depth.

    Declaration
    public DepthBits depthBufferBits
    Field Value
    Type Description
    DepthBits

    dimension

    Texture dimension.

    Declaration
    public TextureDimension dimension
    Field Value
    Type Description
    TextureDimension

    enableRandomWrite

    Enable random UAV read/write on the texture.

    Declaration
    public bool enableRandomWrite
    Field Value
    Type Description
    bool

    fallBackToBlackTexture

    Determines whether the texture will fallback to a black texture if it is read without ever writing to it.

    Declaration
    public bool fallBackToBlackTexture
    Field Value
    Type Description
    bool

    fastMemoryDesc

    Descriptor to determine how the texture will be in fast memory on platform that supports it.

    Declaration
    public FastMemoryDesc fastMemoryDesc
    Field Value
    Type Description
    FastMemoryDesc

    filterMode

    Filtering mode.

    Declaration
    public FilterMode filterMode
    Field Value
    Type Description
    FilterMode

    func

    Texture scale function.

    Declaration
    public ScaleFunc func
    Field Value
    Type Description
    ScaleFunc

    height

    Texture height.

    Declaration
    public int height
    Field Value
    Type Description
    int

    isShadowMap

    Texture is a shadow map.

    Declaration
    public bool isShadowMap
    Field Value
    Type Description
    bool

    memoryless

    Memory less flag.

    Declaration
    public RenderTextureMemoryless memoryless
    Field Value
    Type Description
    RenderTextureMemoryless

    mipMapBias

    Mip map bias.

    Declaration
    public float mipMapBias
    Field Value
    Type Description
    float

    msaaSamples

    Number of MSAA samples.

    Declaration
    public MSAASamples msaaSamples
    Field Value
    Type Description
    MSAASamples

    name

    Texture name.

    Declaration
    public string name
    Field Value
    Type Description
    string

    scale

    Texture scale.

    Declaration
    public Vector2 scale
    Field Value
    Type Description
    Vector2

    sizeMode

    Texture sizing mode.

    Declaration
    public TextureSizeMode sizeMode
    Field Value
    Type Description
    TextureSizeMode

    slices

    Number of texture slices..

    Declaration
    public int slices
    Field Value
    Type Description
    int

    useDynamicScale

    Texture uses dynamic scaling.

    Declaration
    public bool useDynamicScale
    Field Value
    Type Description
    bool

    useMipMap

    Texture needs mip maps.

    Declaration
    public bool useMipMap
    Field Value
    Type Description
    bool

    width

    Texture width.

    Declaration
    public int width
    Field Value
    Type Description
    int

    wrapMode

    Addressing mode.

    Declaration
    public TextureWrapMode wrapMode
    Field Value
    Type Description
    TextureWrapMode

    Methods

    GetHashCode()

    Hash function

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The texture descriptor hash.

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