Skip to main content

RenderTextureDescriptor

This struct contains all the information required to create a RenderTexture. It can be copied, cached, and reused to easily create RenderTextures that all share the same properties. Avoid using the default constructor as it does not initialize some flags with the recommended values.

Members

Properties

NameDescription
RenderTextureDescriptor.autoGenerateMipsMipmap levels are generated automatically when this flag is set.
RenderTextureDescriptor.bindMSIf true and msaaSamples is greater than 1, the render texture will not be resolved by default. Use this if the render texture needs to be bound as a multisampled texture in a shader.
RenderTextureDescriptor.colorFormatThe format of the RenderTarget is expressed as a RenderTextureFormat.
RenderTextureDescriptor.depthBufferBitsThe precision of the render texture's depth buffer in bits (0, 16, 24/32 are supported).
RenderTextureDescriptor.dimensionDimensionality (type) of the render texture.
RenderTextureDescriptor.enableRandomWriteEnable random access write into this render texture on Shader Model 5.0 level shaders.
RenderTextureDescriptor.flagsA set of RenderTextureCreationFlags that control how the texture is created.
RenderTextureDescriptor.graphicsFormatThe color format for the RenderTexture.
RenderTextureDescriptor.heightThe height of the render texture in pixels.
RenderTextureDescriptor.memorylessThe render texture memoryless mode property.
RenderTextureDescriptor.mipCountUser-defined mipmap count.
RenderTextureDescriptor.msaaSamplesThe multisample antialiasing level for the RenderTexture.
RenderTextureDescriptor.shadowSamplingModeDetermines how the RenderTexture is sampled if it is used as a shadow map.
RenderTextureDescriptor.sRGBThis flag causes the render texture uses sRGB read/write conversions.
RenderTextureDescriptor.stencilFormatThe format of the stencil data that you can encapsulate within a RenderTexture.
RenderTextureDescriptor.useDynamicScaleSet to true to enable dynamic resolution scaling on this render texture.
RenderTextureDescriptor.useMipMapRender texture has mipmaps when this flag is set.
RenderTextureDescriptor.volumeDepthVolume extent of a 3D render texture.
RenderTextureDescriptor.widthThe width of the render texture in pixels.

Constructor

NameDescription
RenderTextureDescriptor(width, height)Create a RenderTextureDescriptor with default values.