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.
autoGenerateMips | 如果设置了该标志,则自动生成多级渐进纹理级别。 |
bindMS | 如果为 true 且 msaaSamples 大于 1,则默认不解析渲染纹理。如果需要将渲染纹理绑定为着色器中的多采样纹理,请使用此属性。 |
colorFormat | The format of the RenderTarget is expressed as a RenderTextureFormat. Internally, this format is stored as a GraphicsFormat compatible with the current system (see SystemInfo.GetCompatibleFormat). Therefore, if you set a format and immediately get it again, it may return a different result from the one just set. |
depthBufferBits | The precision of the render texture's depth buffer in bits (0, 16, 24 and 32 are supported). |
depthStencilFormat | The desired format of the depth/stencil buffer. |
dimension | 渲染纹理的维度(类型)。另请参阅:RenderTexture.dimension。 |
enableRandomWrite | 在 Shader Model 5.0 级别着色器上启用随机访问写入该渲染纹理。另请参阅:RenderTexture.enableRandomWrite。 |
flags | 一组 RenderTextureCreationFlags,控制纹理的创建方式。 |
graphicsFormat | The color format for the RenderTexture. You can set this format to None to achieve depth-only rendering. |
height | 渲染纹理的高度(以像素为单位)。 |
memoryless | 渲染纹理无记忆模式属性。 |
mipCount | 用户定义的 Mipmap 数量。 |
msaaSamples | RenderTexture 的多采样抗锯齿级别。另请参阅:RenderTexture.antiAliasing。 |
shadowSamplingMode | 确定当 RenderTexture 用作阴影贴图时的采样方式。另请参阅:ShadowSamplingMode,以了解更多详细信息。 |
sRGB | 此标志会使渲染纹理使用 sRGB 读/写转换。 |
stencilFormat | The format of the stencil data that you can encapsulate within a RenderTexture.Specifying this property creates a stencil element for the RenderTexture and sets its format. This allows for stencil data to be bound as a Texture to all shader types for the platforms that support it. This property does not specify the format of the stencil buffer, which is constrained by the depth buffer format specified in RenderTexture.depth.Currently, most platforms only support R8_UInt (DirectX11, DirectX12), while PS4 also supports R8_UNorm. |
useDynamicScale | 设置为 true 可在此渲染纹理上启用动态分辨率缩放。另请参阅:RenderTexture.useDynamicScale。 |
useMipMap | 如果设置该标志,则渲染纹理具有多级渐进纹理。另请参阅:RenderTexture.useMipMap。 |
volumeDepth | 3D 渲染纹理的体积范围。 |
vrUsage | 如果该 RenderTexture 是在立体渲染中使用的 VR 眼睛纹理,则该属性决定将进行哪些特殊渲染(如果有)。不必手动设置此属性,它会使用 eyeTextureDesc 或其他返回 RenderTextureDescriptor 的 VR 函数返回的值。 |
width | 渲染纹理的宽度(以像素为单位)。 |
RenderTextureDescriptor | 使用默认值或特定宽度、高度和格式创建 RenderTextureDescriptor。 |