SsaoPipeline.pass 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. {
  2. "Type": "JsonSerialization",
  3. "Version": 1,
  4. "ClassName": "PassAsset",
  5. "ClassData": {
  6. "PassTemplate": {
  7. "Name": "SsaoPipeline",
  8. "PassClass": "ParentPass",
  9. "Slots": [
  10. {
  11. "Name": "SwapChainOutput",
  12. "SlotType": "InputOutput",
  13. "ScopeAttachmentUsage": "RenderTarget"
  14. }
  15. ],
  16. "PassRequests": [
  17. {
  18. "Name": "MorphTargetPass",
  19. "TemplateName": "MorphTargetPassTemplate"
  20. },
  21. {
  22. "Name": "SkinningPass",
  23. "TemplateName": "SkinningPassTemplate",
  24. "Connections": [
  25. {
  26. "LocalSlot": "SkinnedMeshOutputStream",
  27. "AttachmentRef": {
  28. "Pass": "MorphTargetPass",
  29. "Attachment": "MorphTargetDeltaOutput"
  30. }
  31. }
  32. ]
  33. },
  34. {
  35. "Name": "RayTracingAccelerationStructurePass",
  36. "TemplateName": "RayTracingAccelerationStructurePassTemplate"
  37. },
  38. {
  39. "Name": "CascadedShadowmapsPass",
  40. "TemplateName": "CascadedShadowmapsTemplate",
  41. "PassData": {
  42. "$type": "RasterPassData",
  43. "DrawListTag": "shadow",
  44. "PipelineViewTag": "DirectionalLightView"
  45. },
  46. "Connections": [
  47. {
  48. "LocalSlot": "SkinnedMeshes",
  49. "AttachmentRef": {
  50. "Pass": "SkinningPass",
  51. "Attachment": "SkinnedMeshOutputStream"
  52. }
  53. }
  54. ]
  55. },
  56. {
  57. "Name": "SpotLightShadowmapsPass",
  58. "TemplateName": "SpotLightShadowmapsTemplate",
  59. "PassData": {
  60. "$type": "RasterPassData",
  61. "DrawListTag": "shadow",
  62. "PipelineViewTag": "SpotLightView"
  63. },
  64. "Connections": [
  65. {
  66. "LocalSlot": "SkinnedMeshes",
  67. "AttachmentRef": {
  68. "Pass": "SkinningPass",
  69. "Attachment": "SkinnedMeshOutputStream"
  70. }
  71. }
  72. ]
  73. },
  74. {
  75. "Name": "EsmShadowmapsPassDirectional",
  76. "TemplateName": "EsmShadowmapsTemplate",
  77. "PassData": {
  78. "$type": "EsmShadowmapsPassData",
  79. "LightType": "directional"
  80. },
  81. "Connections": [
  82. {
  83. "LocalSlot": "DepthShadowmaps",
  84. "AttachmentRef": {
  85. "Pass": "CascadedShadowmapsPass",
  86. "Attachment": "Shadowmap"
  87. }
  88. }
  89. ]
  90. },
  91. {
  92. "Name": "EsmShadowmapsPassSpot",
  93. "TemplateName": "EsmShadowmapsTemplate",
  94. "PassData": {
  95. "$type": "EsmShadowmapsPassData",
  96. "LightType": "spot"
  97. },
  98. "Connections": [
  99. {
  100. "LocalSlot": "DepthShadowmaps",
  101. "AttachmentRef": {
  102. "Pass": "SpotLightShadowmapsPass",
  103. "Attachment": "Shadowmap"
  104. }
  105. }
  106. ]
  107. },
  108. {
  109. "Name": "DepthPass",
  110. "TemplateName": "DepthPassTemplate",
  111. "PassData": {
  112. "$type": "RasterPassData",
  113. "DrawListTag": "depth",
  114. "PipelineViewTag": "MainCamera"
  115. },
  116. "Connections": [
  117. {
  118. "LocalSlot": "SkinnedMeshes",
  119. "AttachmentRef": {
  120. "Pass": "SkinningPass",
  121. "Attachment": "SkinnedMeshOutputStream"
  122. }
  123. }
  124. ]
  125. },
  126. {
  127. "Name": "LightCullingTilePreparePass",
  128. "TemplateName": "LightCullingTilePrepareTemplate",
  129. "Connections": [
  130. {
  131. "LocalSlot": "Depth",
  132. "AttachmentRef": {
  133. "Pass": "DepthPass",
  134. "Attachment": "Output"
  135. }
  136. }
  137. ]
  138. },
  139. {
  140. "Name": "LightCullingPass",
  141. "TemplateName": "LightCullingTemplate",
  142. "Connections": [
  143. {
  144. "LocalSlot": "TileLightData",
  145. "AttachmentRef": {
  146. "Pass": "LightCullingTilePreparePass",
  147. "Attachment": "TileLightData"
  148. }
  149. }
  150. ]
  151. },
  152. {
  153. "Name": "LightCullingRemapPass",
  154. "TemplateName": "LightCullingRemapTemplate",
  155. "Connections": [
  156. {
  157. "LocalSlot": "TileLightData",
  158. "AttachmentRef": {
  159. "Pass": "LightCullingTilePreparePass",
  160. "Attachment": "TileLightData"
  161. }
  162. },
  163. {
  164. "LocalSlot": "LightCount",
  165. "AttachmentRef": {
  166. "Pass": "LightCullingPass",
  167. "Attachment": "LightCount"
  168. }
  169. },
  170. {
  171. "LocalSlot": "LightList",
  172. "AttachmentRef": {
  173. "Pass": "LightCullingPass",
  174. "Attachment": "LightList"
  175. }
  176. }
  177. ]
  178. },
  179. {
  180. "Name": "CameraMotionVectorPass",
  181. "TemplateName": "CameraMotionVectorPassTemplate",
  182. "Connections": [
  183. {
  184. "LocalSlot": "Input",
  185. "AttachmentRef": {
  186. "Pass": "DepthPass",
  187. "Attachment": "Output"
  188. }
  189. }
  190. ],
  191. "PassData": {
  192. "$type": "RasterPassData",
  193. "PipelineViewTag": "MainCamera"
  194. }
  195. },
  196. {
  197. "Name": "MeshMotionVectorPass",
  198. "TemplateName": "MeshMotionVectorPassTemplate",
  199. "PassData": {
  200. "$type": "RasterPassData",
  201. "DrawListTag": "motion",
  202. "PipelineViewTag": "MainCamera"
  203. },
  204. "Connections": [
  205. {
  206. "LocalSlot": "SkinnedMeshes",
  207. "AttachmentRef": {
  208. "Pass": "SkinningPass",
  209. "Attachment": "SkinnedMeshOutputStream"
  210. }
  211. }
  212. ]
  213. },
  214. {
  215. "Name": "ForwardPass",
  216. "TemplateName": "ForwardPassTemplate",
  217. "Connections": [
  218. {
  219. "LocalSlot": "DirectionalLightShadowmap",
  220. "AttachmentRef": {
  221. "Pass": "CascadedShadowmapsPass",
  222. "Attachment": "Shadowmap"
  223. }
  224. },
  225. {
  226. "LocalSlot": "ExponentialShadowmapDirectional",
  227. "AttachmentRef": {
  228. "Pass": "EsmShadowmapsPassDirectional",
  229. "Attachment": "EsmShadowmaps"
  230. }
  231. },
  232. {
  233. "LocalSlot": "SpotLightShadowmap",
  234. "AttachmentRef": {
  235. "Pass": "SpotLightShadowmapsPass",
  236. "Attachment": "Shadowmap"
  237. }
  238. },
  239. {
  240. "LocalSlot": "ExponentialShadowmapSpot",
  241. "AttachmentRef": {
  242. "Pass": "EsmShadowmapsPassSpot",
  243. "Attachment": "EsmShadowmaps"
  244. }
  245. },
  246. {
  247. "LocalSlot": "DepthStencilInputOutput",
  248. "AttachmentRef": {
  249. "Pass": "DepthPass",
  250. "Attachment": "Output"
  251. }
  252. },
  253. {
  254. "LocalSlot": "TileLightData",
  255. "AttachmentRef": {
  256. "Pass": "LightCullingTilePreparePass",
  257. "Attachment": "TileLightData"
  258. }
  259. },
  260. {
  261. "LocalSlot": "LightListRemapped",
  262. "AttachmentRef": {
  263. "Pass": "LightCullingRemapPass",
  264. "Attachment": "LightListRemapped"
  265. }
  266. }
  267. ],
  268. "PassData": {
  269. "$type": "RasterPassData",
  270. "DrawListTag": "forward",
  271. "PipelineViewTag": "MainCamera",
  272. "PassSrgAsset": {
  273. "FilePath": "shaderlib/atom/features/pbr/forwardpasssrg.azsli:PassSrg"
  274. }
  275. }
  276. },
  277. {
  278. "Name": "RayTracingAmbientOcclusionPass",
  279. "TemplateName": "RayTracingAmbientOcclusionPassTemplate",
  280. "Connections": [
  281. {
  282. "LocalSlot": "InputDepth",
  283. "AttachmentRef": {
  284. "Pass": "ForwardPass",
  285. "Attachment": "DepthStencilInputOutput"
  286. }
  287. },
  288. {
  289. "LocalSlot": "WorldNormal",
  290. "AttachmentRef": {
  291. "Pass": "ForwardPass",
  292. "Attachment": "NormalOutput"
  293. }
  294. }
  295. ]
  296. },
  297. {
  298. "Name": "DepthToLinearDepthPass",
  299. "TemplateName": "DepthToLinearTemplate",
  300. "Connections": [
  301. {
  302. "LocalSlot": "Input",
  303. "AttachmentRef": {
  304. "Pass": "DepthPass",
  305. "Attachment": "Output"
  306. }
  307. }
  308. ]
  309. },
  310. {
  311. "Name": "Ssao",
  312. "TemplateName": "SsaoParentTemplate",
  313. "Connections": [
  314. {
  315. "LocalSlot": "LinearDepth",
  316. "AttachmentRef": {
  317. "Pass": "DepthToLinearDepthPass",
  318. "Attachment": "Output"
  319. }
  320. }
  321. ]
  322. },
  323. {
  324. "Name": "DebugWhiteTexture",
  325. "TemplateName": "FullscreenOutputOnlyTemplate",
  326. "ImageAttachments": [
  327. {
  328. "Name": "OutputAttachment",
  329. "SizeSource": {
  330. "Source": {
  331. "Pass": "Parent",
  332. "Attachment": "SwapChainOutput"
  333. }
  334. },
  335. "FormatSource": {
  336. "Pass": "Parent",
  337. "Attachment": "SwapChainOutput"
  338. }
  339. }
  340. ],
  341. "Connections": [
  342. {
  343. "LocalSlot": "Output",
  344. "AttachmentRef": {
  345. "Pass": "This",
  346. "Attachment": "OutputAttachment"
  347. }
  348. }
  349. ],
  350. "PassData": {
  351. "$type": "FullscreenTrianglePassData",
  352. "ShaderDataMappings": {
  353. "ColorMappings": [
  354. {
  355. "Name": "m_color",
  356. "Value": [ 1.0, 1.0, 1.0, 1.0 ]
  357. }
  358. ]
  359. },
  360. "ShaderAsset": {
  361. "FilePath": "Shaders/PostProcessing/UniformColor.shader"
  362. }
  363. }
  364. },
  365. {
  366. "Name": "ModulateWithSsao",
  367. "TemplateName": "ModulateTextureTemplate",
  368. "Enabled": true,
  369. "Connections": [
  370. {
  371. "LocalSlot": "Input",
  372. "AttachmentRef": {
  373. "Pass": "Ssao",
  374. "Attachment": "Output"
  375. }
  376. },
  377. {
  378. "LocalSlot": "InputOutput",
  379. "AttachmentRef": {
  380. "Pass": "DebugWhiteTexture",
  381. "Attachment": "Output"
  382. }
  383. }
  384. ],
  385. "PassData": {
  386. "$type": "ComputePassData",
  387. "ShaderAsset": {
  388. "FilePath": "Shaders/PostProcessing/ModulateTexture.shader"
  389. },
  390. "Make Fullscreen Pass": true
  391. }
  392. },
  393. {
  394. "Name": "SelectorPass",
  395. "TemplateName": "SelectorPassTemplate",
  396. "Enabled": true,
  397. "Connections": [
  398. {
  399. "LocalSlot": "Input1",
  400. "AttachmentRef": {
  401. "Pass": "RayTracingAmbientOcclusionPass",
  402. "Attachment": "OutputAO"
  403. }
  404. },
  405. {
  406. "LocalSlot": "Input2",
  407. "AttachmentRef": {
  408. "Pass": "ModulateWithSsao",
  409. "Attachment": "InputOutput"
  410. }
  411. }
  412. ]
  413. },
  414. {
  415. "Name": "DisplayMapperPass",
  416. "TemplateName": "DisplayMapperTemplate",
  417. "Enabled": true,
  418. "Connections": [
  419. {
  420. "LocalSlot": "Input",
  421. "AttachmentRef": {
  422. "Pass": "SelectorPass",
  423. "Attachment": "Output"
  424. }
  425. },
  426. {
  427. "LocalSlot": "SwapChainOutput",
  428. "AttachmentRef": {
  429. "Pass": "Parent",
  430. "Attachment": "SwapChainOutput"
  431. }
  432. }
  433. ],
  434. "PassData": {
  435. "$type": "DisplayMapperPassData",
  436. "DisplayMapperConfig": {
  437. "Name": "MainPipeline",
  438. "OperationType": "GammaSRGB",
  439. "LdrGradingLutEnabled": "False"
  440. }
  441. }
  442. },
  443. {
  444. "Name": "ImGuiPass",
  445. "TemplateName": "ImGuiPassTemplate",
  446. "Enabled": true,
  447. "Connections": [
  448. {
  449. "LocalSlot": "InputOutput",
  450. "AttachmentRef": {
  451. "Pass": "DisplayMapperPass",
  452. "Attachment": "Output"
  453. }
  454. }
  455. ],
  456. "PassData": {
  457. "$type": "ImGuiPassData",
  458. "IsDefaultImGui": true
  459. }
  460. },
  461. {
  462. "Name": "2DPass",
  463. "TemplateName": "UIPassTemplate",
  464. "Enabled": true,
  465. "Connections": [
  466. {
  467. "LocalSlot": "InputOutput",
  468. "AttachmentRef": {
  469. "Pass": "ImGuiPass",
  470. "Attachment": "InputOutput"
  471. }
  472. }
  473. ],
  474. "PassData": {
  475. "$type": "RasterPassData",
  476. "DrawListTag": "2dpass",
  477. "PipelineViewTag": "MainCamera"
  478. }
  479. },
  480. {
  481. "Name": "CopyToSwapChain",
  482. "TemplateName": "FullscreenCopyTemplate",
  483. "Connections": [
  484. {
  485. "LocalSlot": "Input",
  486. "AttachmentRef": {
  487. "Pass": "2DPass",
  488. "Attachment": "InputOutput"
  489. }
  490. },
  491. {
  492. "LocalSlot": "Output",
  493. "AttachmentRef": {
  494. "Pass": "Parent",
  495. "Attachment": "SwapChainOutput"
  496. }
  497. }
  498. ]
  499. }
  500. ]
  501. }
  502. }
  503. }