Version: 2019.1
public Rendering.TextureDimension dimension ;

Description

Dimensionality (type) of the render texture.

By default render textures are "2D" type, but it is also possible to have Cubemap or 3D render textures by changing dimension before they are created.

Cubemap render textures are most often used for dynamic cubemap reflections, see Camera.RenderToCubemap. A cubemap render texture must have the same width and height, and must be power of two size.

3D (volumetric) render textures currently only work on compute shader capable platforms (like UsingDX11GL3Features). You can render into them using "random access writes" from a pixel shader or a compute shader. Use volumeDepth to set 3D depth, and enableRandomWrite to enable arbitrary writes into it.

See Also: TextureDimension.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961