DeferredOpaqueParent.pass 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. {
  2. "Type": "JsonSerialization",
  3. "Version": 1,
  4. "ClassName": "PassAsset",
  5. "ClassData": {
  6. "PassTemplate": {
  7. "Name": "DeferredOpaqueParentTemplate",
  8. "PassClass": "ParentPass",
  9. "Slots": [
  10. // Inputs...
  11. {
  12. "Name": "DirectionalShadowmap",
  13. "SlotType": "Input"
  14. },
  15. {
  16. "Name": "DirectionalESM",
  17. "SlotType": "Input"
  18. },
  19. {
  20. "Name": "ProjectedShadowmap",
  21. "SlotType": "Input"
  22. },
  23. {
  24. "Name": "ProjectedESM",
  25. "SlotType": "Input"
  26. },
  27. {
  28. "Name": "TileLightData",
  29. "SlotType": "Input"
  30. },
  31. {
  32. "Name": "LightListRemapped",
  33. "SlotType": "Input"
  34. },
  35. {
  36. "Name": "DepthLinear",
  37. "SlotType": "Input"
  38. },
  39. // Input/Outputs...
  40. {
  41. "Name": "DepthStencil",
  42. "SlotType": "InputOutput"
  43. },
  44. // Outputs...
  45. {
  46. "Name": "Output",
  47. "SlotType": "Output"
  48. },
  49. {
  50. "Name": "DiffuseProbeGridVisualization",
  51. "SlotType": "Output"
  52. },
  53. // SwapChain here is only used to reference the frame height and format
  54. {
  55. "Name": "PipelineOutput",
  56. "SlotType": "InputOutput"
  57. }
  58. ],
  59. "Connections": [
  60. {
  61. "LocalSlot": "Output",
  62. "AttachmentRef": {
  63. "Pass": "DiffuseSpecularMergePass",
  64. "Attachment": "Output"
  65. }
  66. }
  67. ],
  68. "PassRequests": [
  69. {
  70. "Name": "DeferredMaterial",
  71. "TemplateName": "DeferredMaterialPassTemplate",
  72. "Connections": [
  73. // Inputs...
  74. // Input/Outputs...
  75. {
  76. "LocalSlot": "DepthStencilInputOutput",
  77. "AttachmentRef": {
  78. "Pass": "Parent",
  79. "Attachment": "DepthStencil"
  80. }
  81. }
  82. ],
  83. "PassData": {
  84. "$type": "RasterPassData",
  85. "DrawListTag": "deferredMaterial",
  86. "PipelineViewTag": "MainCamera"//,
  87. //"PassSrgShaderAsset": {
  88. // "FilePath": "Passes/PrototypeDeferredPipeline/DeferredMaterialPassSrg.shader"
  89. //}
  90. }
  91. },
  92. {
  93. "Name": "DeferredLighting",
  94. "TemplateName": "DeferredLightingPassTemplate",
  95. "Connections": [
  96. // Inputs...
  97. {
  98. "LocalSlot": "DirectionalLightShadowmap",
  99. "AttachmentRef": {
  100. "Pass": "Parent",
  101. "Attachment": "DirectionalShadowmap"
  102. }
  103. },
  104. {
  105. "LocalSlot": "ExponentialShadowmapDirectional",
  106. "AttachmentRef": {
  107. "Pass": "Parent",
  108. "Attachment": "DirectionalESM"
  109. }
  110. },
  111. {
  112. "LocalSlot": "ProjectedShadowmap",
  113. "AttachmentRef": {
  114. "Pass": "Parent",
  115. "Attachment": "ProjectedShadowmap"
  116. }
  117. },
  118. {
  119. "LocalSlot": "ExponentialShadowmapProjected",
  120. "AttachmentRef": {
  121. "Pass": "Parent",
  122. "Attachment": "ProjectedESM"
  123. }
  124. },
  125. {
  126. "LocalSlot": "TileLightData",
  127. "AttachmentRef": {
  128. "Pass": "Parent",
  129. "Attachment": "TileLightData"
  130. }
  131. },
  132. {
  133. "LocalSlot": "LightListRemapped",
  134. "AttachmentRef": {
  135. "Pass": "Parent",
  136. "Attachment": "LightListRemapped"
  137. }
  138. },
  139. {
  140. "LocalSlot": "DepthStencil",
  141. "AttachmentRef": {
  142. "Pass": "Parent",
  143. "Attachment": "DepthStencil"
  144. }
  145. },
  146. {
  147. "LocalSlot": "InputDepthStencil",
  148. "AttachmentRef": {
  149. "Pass": "Parent",
  150. "Attachment": "DepthStencil"
  151. }
  152. },
  153. {
  154. "LocalSlot": "BaseColor",
  155. "AttachmentRef": {
  156. "Pass": "DeferredMaterial",
  157. "Attachment": "BaseColorOutput"
  158. }
  159. },
  160. {
  161. "LocalSlot": "RoughnessMetal",
  162. "AttachmentRef": {
  163. "Pass": "DeferredMaterial",
  164. "Attachment": "RoughnessMetalOutput"
  165. }
  166. },
  167. {
  168. "LocalSlot": "Normal",
  169. "AttachmentRef": {
  170. "Pass": "DeferredMaterial",
  171. "Attachment": "NormalOutput"
  172. }
  173. }
  174. ]
  175. },
  176. {
  177. "Name": "DiffuseGlobalFullscreenPass",
  178. "TemplateName": "DiffuseGlobalFullscreenPassTemplate",
  179. "Connections": [
  180. {
  181. "LocalSlot": "DiffuseInputOutput",
  182. "AttachmentRef": {
  183. "Pass": "DeferredLighting",
  184. "Attachment": "DiffuseOutput"
  185. }
  186. },
  187. {
  188. "LocalSlot": "AlbedoInput",
  189. "AttachmentRef": {
  190. "Pass": "DeferredLighting",
  191. "Attachment": "AlbedoOutput"
  192. }
  193. },
  194. {
  195. "LocalSlot": "NormalInput",
  196. "AttachmentRef": {
  197. "Pass": "DeferredMaterial",
  198. "Attachment": "NormalOutput"
  199. }
  200. },
  201. {
  202. "LocalSlot": "DepthStencilTextureInput",
  203. "AttachmentRef": {
  204. "Pass": "DeferredMaterial",
  205. "Attachment": "DepthStencilInputOutput"
  206. }
  207. },
  208. {
  209. "LocalSlot": "DepthStencilInputOutput",
  210. "AttachmentRef": {
  211. "Pass": "DeferredMaterial",
  212. "Attachment": "DepthStencilInputOutput"
  213. }
  214. }
  215. ]
  216. },
  217. {
  218. "Name": "ReflectionsPass",
  219. "TemplateName": "ReflectionsParentPassTemplate",
  220. "Enabled": true,
  221. "Connections": [
  222. {
  223. "LocalSlot": "NormalInput",
  224. "AttachmentRef": {
  225. "Pass": "DeferredMaterial",
  226. "Attachment": "NormalOutput"
  227. }
  228. },
  229. {
  230. "LocalSlot": "SpecularF0Input",
  231. "AttachmentRef": {
  232. "Pass": "DeferredLighting",
  233. "Attachment": "SpecularF0Output"
  234. }
  235. },
  236. {
  237. "LocalSlot": "AlbedoInput",
  238. "AttachmentRef": {
  239. "Pass": "DeferredLighting",
  240. "Attachment": "AlbedoOutput"
  241. }
  242. },
  243. {
  244. "LocalSlot": "DepthStencilInputOutput",
  245. "AttachmentRef": {
  246. "Pass": "DeferredMaterial",
  247. "Attachment": "DepthStencilInputOutput"
  248. }
  249. },
  250. {
  251. "LocalSlot": "SpecularInputOutput",
  252. "AttachmentRef": {
  253. "Pass": "DeferredLighting",
  254. "Attachment": "SpecularOutput"
  255. }
  256. }
  257. ]
  258. },
  259. {
  260. "Name": "SkyBoxPass",
  261. "TemplateName": "SkyBoxTwoOutputsTemplate",
  262. "Enabled": true,
  263. "Connections": [
  264. {
  265. "LocalSlot": "SpecularInputOutput",
  266. "AttachmentRef": {
  267. "Pass": "ReflectionsPass",
  268. "Attachment": "SpecularInputOutput"
  269. }
  270. },
  271. {
  272. "LocalSlot": "ReflectionInputOutput",
  273. "AttachmentRef": {
  274. "Pass": "ReflectionsPass",
  275. "Attachment": "ReflectionOutput"
  276. }
  277. },
  278. {
  279. "LocalSlot": "SkyBoxDepth",
  280. "AttachmentRef": {
  281. "Pass": "ReflectionsPass",
  282. "Attachment": "DepthStencilInputOutput"
  283. }
  284. }
  285. ]
  286. },
  287. {
  288. "Name": "SkyAtmosphereParentPass",
  289. "TemplateName": "SkyAtmosphereParentTemplate",
  290. "Enabled": true,
  291. "Connections": [
  292. {
  293. "LocalSlot": "SpecularInputOutput",
  294. "AttachmentRef": {
  295. "Pass": "SkyBoxPass",
  296. "Attachment": "SpecularInputOutput"
  297. }
  298. },
  299. {
  300. "LocalSlot": "ReflectionInputOutput",
  301. "AttachmentRef": {
  302. "Pass": "SkyBoxPass",
  303. "Attachment": "ReflectionInputOutput"
  304. }
  305. },
  306. {
  307. "LocalSlot": "SkyBoxDepth",
  308. "AttachmentRef": {
  309. "Pass": "SkyBoxPass",
  310. "Attachment": "SkyBoxDepth"
  311. }
  312. },
  313. {
  314. "LocalSlot": "DirectionalShadowmap",
  315. "AttachmentRef": {
  316. "Pass": "Parent",
  317. "Attachment": "DirectionalShadowmap"
  318. }
  319. },
  320. {
  321. "LocalSlot": "DirectionalESM",
  322. "AttachmentRef": {
  323. "Pass": "Parent",
  324. "Attachment": "DirectionalESM"
  325. }
  326. }
  327. ]
  328. },
  329. {
  330. "Name": "ReflectionCompositePass",
  331. "TemplateName": "ReflectionCompositePassTemplate",
  332. "Connections": [
  333. {
  334. "LocalSlot": "ReflectionInput",
  335. "AttachmentRef": {
  336. "Pass": "SkyAtmosphereParentPass",
  337. "Attachment": "ReflectionInputOutput"
  338. }
  339. },
  340. {
  341. "LocalSlot": "SpecularInputOutput",
  342. "AttachmentRef": {
  343. "Pass": "SkyAtmosphereParentPass",
  344. "Attachment": "SpecularInputOutput"
  345. }
  346. },
  347. {
  348. "LocalSlot": "DepthStencilInputOutput",
  349. "AttachmentRef": {
  350. "Pass": "SkyBoxPass",
  351. "Attachment": "SkyBoxDepth"
  352. }
  353. }
  354. ],
  355. "PassData": {
  356. "$type": "FullscreenTrianglePassData",
  357. "ShaderAsset": {
  358. "FilePath": "Shaders/Reflections/ReflectionComposite.shader"
  359. },
  360. "StencilRef": 1, // See RenderCommon.h and ReflectionComposite.shader
  361. "PipelineViewTag": "MainCamera"
  362. }
  363. },
  364. {
  365. "Name": "MSAAResolveDiffusePass",
  366. "TemplateName": "MSAAResolveColorTemplate",
  367. "Connections": [
  368. {
  369. "LocalSlot": "Input",
  370. "AttachmentRef": {
  371. "Pass": "DiffuseGlobalFullscreenPass",
  372. "Attachment": "DiffuseInputOutput"
  373. }
  374. }
  375. ]
  376. },
  377. {
  378. "Name": "MSAAResolveSpecularPass",
  379. "TemplateName": "MSAAResolveCustomTemplate",
  380. "Connections": [
  381. {
  382. "LocalSlot": "Input",
  383. "AttachmentRef": {
  384. "Pass": "ReflectionCompositePass",
  385. "Attachment": "SpecularInputOutput"
  386. }
  387. }
  388. ],
  389. "PassData": {
  390. "$type": "FullscreenTrianglePassData",
  391. "ShaderAsset": {
  392. "FilePath": "Shaders/PostProcessing/MSAAResolveCustom.shader"
  393. },
  394. "PipelineViewTag": "MainCamera",
  395. "ShaderDataMappings": {
  396. "UintMappings": [
  397. {
  398. "Name": "enableNeighborClamping",
  399. "Value": 1
  400. }
  401. ],
  402. "FloatMappings": [
  403. {
  404. "Name": "maxNeighborContrast",
  405. "Value": 1.5
  406. }
  407. ]
  408. }
  409. }
  410. },
  411. //{
  412. // "Name": "MSAAResolveScatterDistancePass",
  413. // "TemplateName": "MSAAResolveColorTemplate",
  414. // "Connections": [
  415. // {
  416. // "LocalSlot": "Input",
  417. // "AttachmentRef": {
  418. // "Pass": "ForwardSubsurface",
  419. // "Attachment": "ScatterDistanceOutput"
  420. // }
  421. // }
  422. // ]
  423. //},
  424. //{
  425. // "Name": "SubsurfaceScatteringPass",
  426. // "TemplateName": "SubsurfaceScatteringPassTemplate",
  427. // "Enabled": true,
  428. // "Connections": [
  429. // {
  430. // "LocalSlot": "InputDiffuse",
  431. // "AttachmentRef": {
  432. // "Pass": "MSAAResolveDiffusePass",
  433. // "Attachment": "Output"
  434. // }
  435. // },
  436. // {
  437. // "LocalSlot": "InputLinearDepth",
  438. // "AttachmentRef": {
  439. // "Pass": "Parent",
  440. // "Attachment": "DepthLinear"
  441. // }
  442. // },
  443. // {
  444. // "LocalSlot": "InputScatterDistance",
  445. // "AttachmentRef": {
  446. // "Pass": "MSAAResolveScatterDistancePass",
  447. // "Attachment": "Output"
  448. // }
  449. // }
  450. // ],
  451. // "PassData": {
  452. // "$type": "ComputePassData",
  453. // "ShaderAsset": {
  454. // "FilePath": "Shaders/PostProcessing/ScreenSpaceSubsurfaceScatteringCS.shader"
  455. // },
  456. // "Make Fullscreen Pass": true,
  457. // "PipelineViewTag": "MainCamera"
  458. // }
  459. //},
  460. {
  461. "Name": "Ssao",
  462. "TemplateName": "SsaoParentTemplate",
  463. "Connections": [
  464. {
  465. "LocalSlot": "Modulate",
  466. "AttachmentRef": {
  467. "Pass": "MSAAResolveDiffusePass",
  468. "Attachment": "Output"
  469. }
  470. //"AttachmentRef": {
  471. // "Pass": "SubsurfaceScatteringPass",
  472. // "Attachment": "Output"
  473. //}
  474. }
  475. ]
  476. },
  477. {
  478. "Name": "DiffuseSpecularMergePass",
  479. "TemplateName": "DiffuseSpecularMergeTemplate",
  480. "Connections": [
  481. {
  482. "LocalSlot": "InputDiffuse",
  483. "AttachmentRef": {
  484. "Pass": "Ssao",
  485. "Attachment": "Output"
  486. }
  487. },
  488. {
  489. "LocalSlot": "InputSpecular",
  490. "AttachmentRef": {
  491. "Pass": "MSAAResolveSpecularPass",
  492. "Attachment": "Output"
  493. }
  494. }
  495. ]
  496. }
  497. ]
  498. }
  499. }
  500. }