post processing
[WindSway-HDRP.git] / Library / PackageCache / com.unity.render-pipelines.high-definition@4.10.0-preview / Runtime / Core / Textures / RTHandles.cs
blobd7ed24eb8027e30ded5548aac75549fb12732b50
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(
14 int width,
15 int height,
16 int slices = 1,
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,
22 bool sRGB = true,
23 bool enableRandomWrite = false,
24 bool useMipMap = false,
25 bool autoGenerateMips = true,
26 int anisoLevel = 1,
27 float mipMapBias = 0,
28 MSAASamples msaaSamples = MSAASamples.None,
29 bool bindTextureMS = false,
30 bool useDynamicScale = false,
31 VRTextureUsage vrUsage = VRTextureUsage.None,
32 RenderTextureMemoryless memoryless = RenderTextureMemoryless.None,
33 string name = ""
36 return s_DefaultInstance.Alloc(
37 width,
38 height,
39 slices,
40 depthBufferBits,
41 colorFormat,
42 filterMode,
43 wrapMode,
44 dimension,
45 sRGB,
46 enableRandomWrite,
47 useMipMap,
48 autoGenerateMips,
49 anisoLevel,
50 mipMapBias,
51 msaaSamples,
52 bindTextureMS,
53 useDynamicScale,
54 vrUsage,
55 memoryless,
56 name
60 public static RTHandleSystem.RTHandle Alloc(
61 Vector2 scaleFactor,
62 int slices = 1,
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,
68 bool sRGB = true,
69 bool enableRandomWrite = false,
70 bool useMipMap = false,
71 bool autoGenerateMips = true,
72 int anisoLevel = 1,
73 float mipMapBias = 0,
74 bool enableMSAA = false,
75 bool bindTextureMS = false,
76 bool useDynamicScale = false,
77 VRTextureUsage vrUsage = VRTextureUsage.None,
78 RenderTextureMemoryless memoryless = RenderTextureMemoryless.None,
79 string name = ""
82 return s_DefaultInstance.Alloc(
83 scaleFactor,
84 slices,
85 depthBufferBits,
86 colorFormat,
87 filterMode,
88 wrapMode,
89 dimension,
90 sRGB,
91 enableRandomWrite,
92 useMipMap,
93 autoGenerateMips,
94 anisoLevel,
95 mipMapBias,
96 enableMSAA,
97 bindTextureMS,
98 useDynamicScale,
99 vrUsage,
100 memoryless,
101 name
105 public static RTHandleSystem.RTHandle Alloc(
106 ScaleFunc scaleFunc,
107 int slices = 1,
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,
113 bool sRGB = true,
114 bool enableRandomWrite = false,
115 bool useMipMap = false,
116 bool autoGenerateMips = true,
117 int anisoLevel = 1,
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,
124 string name = ""
127 return s_DefaultInstance.Alloc(
128 scaleFunc,
129 slices,
130 depthBufferBits,
131 colorFormat,
132 filterMode,
133 wrapMode,
134 dimension,
135 sRGB,
136 enableRandomWrite,
137 useMipMap,
138 autoGenerateMips,
139 anisoLevel,
140 mipMapBias,
141 enableMSAA,
142 bindTextureMS,
143 useDynamicScale,
144 vrUsage,
145 memoryless,
146 name
150 public static void Initialize(
151 int width,
152 int height,
153 bool scaledRTsupportsMSAA,
154 MSAASamples scaledRTMSAASamples
157 s_DefaultInstance.Initialize(
158 width,
159 height,
160 scaledRTsupportsMSAA,
161 scaledRTMSAASamples
165 public static void Release(RTHandleSystem.RTHandle rth)
167 s_DefaultInstance.Release(rth);
170 public static void ResetReferenceSize(
171 int width,
172 int height,
173 MSAASamples msaaSamples
176 s_DefaultInstance.ResetReferenceSize(
177 width,
178 height,
179 msaaSamples
183 public static void SetReferenceSize(
184 int width,
185 int height,
186 MSAASamples msaaSamples
189 s_DefaultInstance.SetReferenceSize(
190 width,
191 height,
192 msaaSamples