Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DebugViewEnums.cs 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. #region Material Settings
  5. /// <summary>
  6. /// Debug material modes.
  7. /// </summary>
  8. [GenerateHLSL]
  9. public enum DebugMaterialMode
  10. {
  11. /// <summary>No material debug.</summary>
  12. None,
  13. /// <summary>Display material albedo.</summary>
  14. Albedo,
  15. /// <summary>Display material specular.</summary>
  16. Specular,
  17. /// <summary>Display material alpha.</summary>
  18. Alpha,
  19. /// <summary>Display material smoothness.</summary>
  20. Smoothness,
  21. /// <summary>Display material ambient occlusion.</summary>
  22. AmbientOcclusion,
  23. /// <summary>Display material emission.</summary>
  24. Emission,
  25. /// <summary>Display material normal (world space).</summary>
  26. NormalWorldSpace,
  27. /// <summary>Display material normal (tangent space).</summary>
  28. NormalTangentSpace,
  29. /// <summary>Display evaluated lighting complexity.</summary>
  30. LightingComplexity,
  31. /// <summary>Display material metallic.</summary>
  32. Metallic,
  33. /// <summary>Display material sprite mask.</summary>
  34. SpriteMask,
  35. }
  36. /// <summary>
  37. /// Debug mode for displaying vertex attributes interpolated from vertex to pixel shader.
  38. /// </summary>
  39. [GenerateHLSL]
  40. public enum DebugVertexAttributeMode
  41. {
  42. /// <summary>No vertex attribute debug.</summary>
  43. None,
  44. /// <summary>Display texture coordinate 0.</summary>
  45. Texcoord0,
  46. /// <summary>Display texture coordinate 1.</summary>
  47. Texcoord1,
  48. /// <summary>Display texture coordinate 2.</summary>
  49. Texcoord2,
  50. /// <summary>Display texture coordinate 3.</summary>
  51. Texcoord3,
  52. /// <summary>Display vertex color.</summary>
  53. Color,
  54. /// <summary>Display tangent.</summary>
  55. Tangent,
  56. /// <summary>Display normal.</summary>
  57. Normal,
  58. }
  59. /// <summary>
  60. /// Debug mode for validating out-of-range values of different material channels.
  61. /// </summary>
  62. [GenerateHLSL]
  63. public enum DebugMaterialValidationMode
  64. {
  65. /// <summary>No material debug validation override.</summary>
  66. None,
  67. /// <summary>Validate albedo values according to validation settings.</summary>
  68. Albedo,
  69. /// <summary>Validate metallic values according to validation settings.</summary>
  70. Metallic
  71. }
  72. #endregion
  73. #region Rendering Settings
  74. /// <summary>
  75. /// Debug mode for displaying intermediate render targets.
  76. /// </summary>
  77. [GenerateHLSL]
  78. public enum DebugFullScreenMode
  79. {
  80. /// <summary>No intermediate render target displayed.</summary>
  81. None,
  82. /// <summary>Display depth buffer contents.</summary>
  83. Depth,
  84. // NOTE: we could also add (dir, mag) format.
  85. /// <summary>Display depth buffer contents.</summary>
  86. [InspectorName("Motion Vector (100x, normalized)")]
  87. MotionVector,
  88. /// <summary>Display the shadow map from additional lights.</summary>
  89. AdditionalLightsShadowMap,
  90. /// <summary>Display the main shadow map.</summary>
  91. MainLightShadowMap,
  92. /// <summary> Display the light cookie atlas for additional lights.</summary>
  93. AdditionalLightsCookieAtlas,
  94. /// <summary>
  95. /// Display the reflection probe atlas used for the Forward+ rendering path.
  96. /// </summary>
  97. ReflectionProbeAtlas,
  98. /// <summary>
  99. /// Displays the active STP debug view.
  100. /// </summary>
  101. STP,
  102. }
  103. /// <summary>
  104. /// Debug mode that overrides how the renderer behaves.
  105. /// </summary>
  106. [GenerateHLSL]
  107. public enum DebugSceneOverrideMode
  108. {
  109. /// <summary>No debug override.</summary>
  110. None,
  111. /// <summary>Visualize overdraw by drawing geometry using a semitransparent material. Areas that look opaque contain more overdraw.</summary>
  112. Overdraw,
  113. /// <summary>Render using wireframe only.</summary>
  114. Wireframe,
  115. /// <summary>Render using a constant fill color and wireframe.</summary>
  116. SolidWireframe,
  117. /// <summary>Render shaded geometry in addition to wireframe.</summary>
  118. ShadedWireframe,
  119. }
  120. /// <summary>
  121. /// Debug mode of the overdraw
  122. /// </summary>
  123. public enum DebugOverdrawMode
  124. {
  125. /// <summary>No overdraw debug mode.</summary>
  126. None,
  127. /// <summary>Debug overdraw of opaque only.</summary>
  128. Opaque,
  129. /// <summary>Debug overdraw of transparent only.</summary>
  130. Transparent,
  131. /// <summary>Debug overdraw of everything only.</summary>
  132. All
  133. }
  134. /// <summary>
  135. /// Debug mode for texture mipmap streaming.
  136. /// </summary>
  137. // Keep in sync with DebugMipMapMode in HDRP's Runtime/Debug/MipMapDebug.cs
  138. [GenerateHLSL]
  139. public enum DebugMipInfoMode
  140. {
  141. /// <summary>No mipmap debug.</summary>
  142. None,
  143. /// <summary>Display savings and shortage due to streaming.</summary>
  144. MipStreamingPerformance,
  145. /// <summary>Display the streaming status of materials and textures.</summary>
  146. MipStreamingStatus,
  147. /// <summary>Highlight recently streamed data.</summary>
  148. MipStreamingActivity,
  149. /// <summary>Display streaming priorities as set up when importing.</summary>
  150. MipStreamingPriority,
  151. /// <summary>Display the amount of uploaded mip levels.</summary>
  152. MipCount,
  153. /// <summary>Visualize the pixel density for the highest-resolution uploaded mip level from the camera's point-of-view.</summary>
  154. MipRatio,
  155. }
  156. /// <summary>
  157. /// Aggregation mode for texture mipmap streaming debugging information.
  158. /// </summary>
  159. // Keep in sync with DebugMipMapStatusMode in HDRP's Runtime/Debug/MipMapDebug.cs
  160. [GenerateHLSL]
  161. public enum DebugMipMapStatusMode
  162. {
  163. /// <summary>Show debug information aggregated per material.</summary>
  164. Material,
  165. /// <summary>Show debug information for the selected texture slot.</summary>
  166. Texture,
  167. }
  168. /// <summary>
  169. /// Terrain layer for texture mipmap streaming debugging.
  170. /// </summary>
  171. [GenerateHLSL]
  172. public enum DebugMipMapModeTerrainTexture
  173. {
  174. /// <summary>Control texture debug.</summary>
  175. Control,
  176. /// <summary>Layer 0 diffuse texture debug.</summary>
  177. [InspectorName("Layer 0 - Diffuse")] Layer0,
  178. /// <summary>Layer 1 diffuse texture debug.</summary>
  179. [InspectorName("Layer 1 - Diffuse")] Layer1,
  180. /// <summary>Layer 2 diffuse texture debug.</summary>
  181. [InspectorName("Layer 2 - Diffuse")] Layer2,
  182. /// <summary>Layer 3 diffuse texture debug.</summary>
  183. [InspectorName("Layer 3 - Diffuse")] Layer3,
  184. }
  185. /// <summary>
  186. /// Mode that controls if post-processing is allowed.
  187. /// </summary>
  188. /// <remarks>
  189. /// When "Auto" is used, post-processing can be either on or off, depending on other active debug modes.
  190. /// </remarks>
  191. [GenerateHLSL]
  192. public enum DebugPostProcessingMode
  193. {
  194. /// <summary>Post-processing disabled.</summary>
  195. Disabled,
  196. /// <summary>Post-processing is either on or off, depending on other debug modes.</summary>
  197. Auto,
  198. /// <summary>Post-processing enabled.</summary>
  199. Enabled
  200. };
  201. /// <summary>
  202. /// Debug modes for validating illegal output values.
  203. /// </summary>
  204. [GenerateHLSL]
  205. public enum DebugValidationMode
  206. {
  207. /// <summary>No validation.</summary>
  208. None,
  209. /// <summary>Highlight all pixels containing NaN (not a number), infinite or negative values.</summary>
  210. [InspectorName("Highlight NaN, Inf and Negative Values")]
  211. HighlightNanInfNegative,
  212. /// <summary>Highlight all pixels with values outside the specified range.</summary>
  213. [InspectorName("Highlight Values Outside Range")]
  214. HighlightOutsideOfRange
  215. }
  216. /// <summary>
  217. /// The channels used by DebugValidationMode.HighlightOutsideOfRange.
  218. /// </summary>
  219. /// <remarks>
  220. /// When "RGB" is used, the pixel's RGB value is first converted to a luminance value.
  221. /// Individual channels (R, G, B, and A) are tested individually against the range.
  222. /// </remarks>
  223. [GenerateHLSL]
  224. public enum PixelValidationChannels
  225. {
  226. /// <summary>Use luminance calculated from RGB channels as the value to validate.</summary>
  227. RGB,
  228. /// <summary>Validate the red channel value.</summary>
  229. R,
  230. /// <summary>Validate the green channel value.</summary>
  231. G,
  232. /// <summary>Validate the blue channel value.</summary>
  233. B,
  234. /// <summary>Validate the alpha channel value.</summary>
  235. A
  236. }
  237. #endregion
  238. #region Lighting settings
  239. /// <summary>
  240. /// Debug modes for lighting.
  241. /// </summary>
  242. [GenerateHLSL]
  243. public enum DebugLightingMode
  244. {
  245. /// <summary>No lighting debug mode.</summary>
  246. None,
  247. /// <summary>Display shadow cascades using different colors.</summary>
  248. ShadowCascades,
  249. /// <summary>Display lighting result without applying normal maps.</summary>
  250. LightingWithoutNormalMaps,
  251. /// <summary>Display lighting result (including normal maps).</summary>
  252. LightingWithNormalMaps,
  253. /// <summary>Display only reflections.</summary>
  254. Reflections,
  255. /// <summary>Display only reflections with smoothness.</summary>
  256. ReflectionsWithSmoothness,
  257. /// <summary>Display the indirect irradiance</summary>
  258. GlobalIllumination,
  259. }
  260. /// <summary>
  261. /// HDR debug mode.
  262. /// </summary>
  263. [GenerateHLSL]
  264. public enum HDRDebugMode
  265. {
  266. /// <summary>No HDR debugging.</summary>
  267. None,
  268. /// <summary>Gamut view: show the gamuts and what part of the gamut the image shows.</summary>
  269. GamutView,
  270. /// <summary>Gamut clip: show what part of the Scene is covered by the Rec709 gamut and which parts are in the Rec2020 gamut.</summary>
  271. GamutClip,
  272. /// <summary>If the luminance value exceeds the paper white value, show the exceeding value in colors between yellow and red. Shows luminance values otherwise.</summary>
  273. ValuesAbovePaperWhite
  274. }
  275. /// <summary>
  276. /// Debug mode that allows selective disabling of individual lighting components.
  277. /// </summary>
  278. [GenerateHLSL, Flags]
  279. public enum DebugLightingFeatureFlags
  280. {
  281. /// <summary>The debug mode is not active.</summary>
  282. None,
  283. /// <summary>Display contribution from global illumination.</summary>
  284. GlobalIllumination = 0x1,
  285. /// <summary>Display contribution from the main light.</summary>
  286. MainLight = 0x2,
  287. /// <summary>Display contribution from additional lights.</summary>
  288. AdditionalLights = 0x4,
  289. /// <summary>Display contribution from vertex lighting.</summary>
  290. VertexLighting = 0x8,
  291. /// <summary>Display contribution from emissive objects.</summary>
  292. Emission = 0x10,
  293. /// <summary>Display contribution from ambient occlusion.</summary>
  294. AmbientOcclusion = 0x20,
  295. }
  296. #endregion
  297. }