Struct TextureDesc
Descriptor used to create texture resources
Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
Syntax
public struct TextureDesc
Constructors
TextureDesc(Int32, Int32, Boolean, Boolean)
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 | 
|---|---|---|
| Int32 | width | Texture width  | 
| Int32 | height | Texture height  | 
| Boolean | dynamicResolution | Use dynamic resolution  | 
| Boolean | 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, Boolean, Boolean)
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  | 
| Boolean | dynamicResolution | Use dynamic resolution  | 
| Boolean | xrReady | Set this to true if the Texture is a render texture in an XR setting.  | 
TextureDesc(Vector2, Boolean, Boolean)
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  | 
| Boolean | dynamicResolution | Use dynamic resolution  | 
| Boolean | 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 | 
|---|---|
| Int32 | 
autoGenerateMips
Automatically generate mip maps.
Declaration
public bool autoGenerateMips
Field Value
| Type | Description | 
|---|---|
| Boolean | 
bindTextureMS
Bind texture multi sampled.
Declaration
public bool bindTextureMS
Field Value
| Type | Description | 
|---|---|
| Boolean | 
clearBuffer
Texture needs to be cleared on first use.
Declaration
public bool clearBuffer
Field Value
| Type | Description | 
|---|---|
| Boolean | 
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 | 
enableMSAA
Textre is multisampled. Only supported for Scale and Functor size mode.
Declaration
public bool enableMSAA
Field Value
| Type | Description | 
|---|---|
| Boolean | 
enableRandomWrite
Enable random UAV read/write on the texture.
Declaration
public bool enableRandomWrite
Field Value
| Type | Description | 
|---|---|
| Boolean | 
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 | 
|---|---|
| Int32 | 
isShadowMap
Texture is a shadow map.
Declaration
public bool isShadowMap
Field Value
| Type | Description | 
|---|---|
| Boolean | 
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 | 
|---|---|
| Single | 
msaaSamples
Number of MSAA samples. Only supported for Explicit size mode.
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 | 
|---|---|
| Int32 | 
useDynamicScale
Texture uses dynamic scaling.
Declaration
public bool useDynamicScale
Field Value
| Type | Description | 
|---|---|
| Boolean | 
useMipMap
Texture needs mip maps.
Declaration
public bool useMipMap
Field Value
| Type | Description | 
|---|---|
| Boolean | 
width
Texture width.
Declaration
public int width
Field Value
| Type | Description | 
|---|---|
| Int32 | 
wrapMode
Addressing mode.
Declaration
public TextureWrapMode wrapMode
Field Value
| Type | Description | 
|---|---|
| TextureWrapMode | 
Methods
GetHashCode()
Hash function
Declaration
public override int GetHashCode()
Returns
| Type | Description | 
|---|---|
| Int32 | The texture descriptor hash.  |