Struct TextureDesc
Descriptor used to create texture resources
Inherited Members
Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public struct TextureDescConstructors
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 determine 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 anisoLevelField Value
| Type | Description | 
|---|---|
| int | 
autoGenerateMips
Automatically generate mip maps.
Declaration
public bool autoGenerateMipsField Value
| Type | Description | 
|---|---|
| bool | 
bindTextureMS
Bind texture multi sampled.
Declaration
public bool bindTextureMSField Value
| Type | Description | 
|---|---|
| bool | 
clearBuffer
Texture needs to be cleared on first use.
Declaration
public bool clearBufferField Value
| Type | Description | 
|---|---|
| bool | 
clearColor
Clear color.
Declaration
public Color clearColorField Value
| Type | Description | 
|---|---|
| Color | 
colorFormat
Color format.
Declaration
public GraphicsFormat colorFormatField Value
| Type | Description | 
|---|---|
| GraphicsFormat | 
depthBufferBits
Depth buffer bit depth.
Declaration
public DepthBits depthBufferBitsField Value
| Type | Description | 
|---|---|
| DepthBits | 
dimension
Texture dimension.
Declaration
public TextureDimension dimensionField Value
| Type | Description | 
|---|---|
| TextureDimension | 
disableFallBackToImportedTexture
If all passes writing to a texture are culled by Dynamic Render Pass Culling, it will automatically fallback to a similar preallocated texture. Set this to true to force the allocation.
Declaration
public bool disableFallBackToImportedTextureField Value
| Type | Description | 
|---|---|
| bool | 
discardBuffer
Texture needs to be discarded on last use.
Declaration
public bool discardBufferField Value
| Type | Description | 
|---|---|
| bool | 
enableRandomWrite
Enable random UAV read/write on the texture.
Declaration
public bool enableRandomWriteField 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 fallBackToBlackTextureField Value
| Type | Description | 
|---|---|
| bool | 
fastMemoryDesc
Descriptor to determine how the texture will be in fast memory on platform that supports it.
Declaration
public FastMemoryDesc fastMemoryDescField Value
| Type | Description | 
|---|---|
| FastMemoryDesc | 
filterMode
Filtering mode.
Declaration
public FilterMode filterModeField Value
| Type | Description | 
|---|---|
| FilterMode | 
func
Texture scale function.
Declaration
public ScaleFunc funcField Value
| Type | Description | 
|---|---|
| ScaleFunc | 
height
Texture height.
Declaration
public int heightField Value
| Type | Description | 
|---|---|
| int | 
isShadowMap
Texture is a shadow map.
Declaration
public bool isShadowMapField Value
| Type | Description | 
|---|---|
| bool | 
memoryless
Memory less flag.
Declaration
public RenderTextureMemoryless memorylessField Value
| Type | Description | 
|---|---|
| RenderTextureMemoryless | 
mipMapBias
Mip map bias.
Declaration
public float mipMapBiasField Value
| Type | Description | 
|---|---|
| float | 
msaaSamples
Number of MSAA samples.
Declaration
public MSAASamples msaaSamplesField Value
| Type | Description | 
|---|---|
| MSAASamples | 
name
Texture name.
Declaration
public string nameField Value
| Type | Description | 
|---|---|
| string | 
scale
Texture scale.
Declaration
public Vector2 scaleField Value
| Type | Description | 
|---|---|
| Vector2 | 
sizeMode
Texture sizing mode.
Declaration
public TextureSizeMode sizeModeField Value
| Type | Description | 
|---|---|
| TextureSizeMode | 
slices
Number of texture slices..
Declaration
public int slicesField Value
| Type | Description | 
|---|---|
| int | 
useDynamicScale
Texture uses dynamic scaling.
Declaration
public bool useDynamicScaleField Value
| Type | Description | 
|---|---|
| bool | 
useMipMap
Texture needs mip maps.
Declaration
public bool useMipMapField Value
| Type | Description | 
|---|---|
| bool | 
vrUsage
Special treatment of the VR eye texture used in stereoscopic rendering.
Declaration
public VRTextureUsage vrUsageField Value
| Type | Description | 
|---|---|
| VRTextureUsage | 
width
Texture width.
Declaration
public int widthField Value
| Type | Description | 
|---|---|
| int | 
wrapMode
Addressing mode.
Declaration
public TextureWrapMode wrapModeField Value
| Type | Description | 
|---|---|
| TextureWrapMode | 
Methods
CalculateFinalDimensions()
Declaration
public Vector2Int CalculateFinalDimensions()Returns
| Type | Description | 
|---|---|
| Vector2Int | 
GetHashCode()
Hash function
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | The texture descriptor hash. |