1 using System
.Collections
.Generic
;
2 using UnityEngine
.Rendering
;
4 namespace UnityEngine
.Experimental
.Rendering
6 public static class RTHandles
8 static RTHandleSystem s_DefaultInstance
= new RTHandleSystem();
10 public static int maxWidth { get { return s_DefaultInstance.GetMaxWidth(); }
}
11 public static int maxHeight { get { return s_DefaultInstance.GetMaxHeight(); }
}
13 public static RTHandleSystem
.RTHandle
Alloc(
17 DepthBits depthBufferBits
= DepthBits
.None
,
18 RenderTextureFormat colorFormat
= RenderTextureFormat
.Default
,
19 FilterMode filterMode
= FilterMode
.Point
,
20 TextureWrapMode wrapMode
= TextureWrapMode
.Repeat
,
21 TextureDimension dimension
= TextureDimension
.Tex2D
,
23 bool enableRandomWrite
= false,
24 bool useMipMap
= false,
25 bool autoGenerateMips
= true,
28 MSAASamples msaaSamples
= MSAASamples
.None
,
29 bool bindTextureMS
= false,
30 bool useDynamicScale
= false,
31 VRTextureUsage vrUsage
= VRTextureUsage
.None
,
32 RenderTextureMemoryless memoryless
= RenderTextureMemoryless
.None
,
36 return s_DefaultInstance
.Alloc(
60 public static RTHandleSystem
.RTHandle
Alloc(
63 DepthBits depthBufferBits
= DepthBits
.None
,
64 RenderTextureFormat colorFormat
= RenderTextureFormat
.Default
,
65 FilterMode filterMode
= FilterMode
.Point
,
66 TextureWrapMode wrapMode
= TextureWrapMode
.Repeat
,
67 TextureDimension dimension
= TextureDimension
.Tex2D
,
69 bool enableRandomWrite
= false,
70 bool useMipMap
= false,
71 bool autoGenerateMips
= true,
74 bool enableMSAA
= false,
75 bool bindTextureMS
= false,
76 bool useDynamicScale
= false,
77 VRTextureUsage vrUsage
= VRTextureUsage
.None
,
78 RenderTextureMemoryless memoryless
= RenderTextureMemoryless
.None
,
82 return s_DefaultInstance
.Alloc(
105 public static RTHandleSystem
.RTHandle
Alloc(
108 DepthBits depthBufferBits
= DepthBits
.None
,
109 RenderTextureFormat colorFormat
= RenderTextureFormat
.Default
,
110 FilterMode filterMode
= FilterMode
.Point
,
111 TextureWrapMode wrapMode
= TextureWrapMode
.Repeat
,
112 TextureDimension dimension
= TextureDimension
.Tex2D
,
114 bool enableRandomWrite
= false,
115 bool useMipMap
= false,
116 bool autoGenerateMips
= true,
118 float mipMapBias
= 0,
119 bool enableMSAA
= false,
120 bool bindTextureMS
= false,
121 bool useDynamicScale
= false,
122 VRTextureUsage vrUsage
= VRTextureUsage
.None
,
123 RenderTextureMemoryless memoryless
= RenderTextureMemoryless
.None
,
127 return s_DefaultInstance
.Alloc(
150 public static void Initialize(
153 bool scaledRTsupportsMSAA
,
154 MSAASamples scaledRTMSAASamples
157 s_DefaultInstance
.Initialize(
160 scaledRTsupportsMSAA
,
165 public static void Release(RTHandleSystem
.RTHandle rth
)
167 s_DefaultInstance
.Release(rth
);
170 public static void ResetReferenceSize(
173 MSAASamples msaaSamples
176 s_DefaultInstance
.ResetReferenceSize(
183 public static void SetReferenceSize(
186 MSAASamples msaaSamples
189 s_DefaultInstance
.SetReferenceSize(