DeferredLighting.pass 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. {
  2. "Type": "JsonSerialization",
  3. "Version": 1,
  4. "ClassName": "PassAsset",
  5. "ClassData": {
  6. "PassTemplate": {
  7. "Name": "DeferredLightingPassTemplate",
  8. "PassClass": "FullScreenTriangle",
  9. "Slots": [
  10. // Inputs...
  11. {
  12. "Name": "BRDFTextureInput",
  13. "ShaderInputName": "m_brdfMap",
  14. "SlotType": "Input",
  15. "ScopeAttachmentUsage": "Shader"
  16. },
  17. {
  18. "Name": "FullscreenShadow",
  19. "ShaderInputName": "m_fullscreenShadow",
  20. "SlotType": "Input",
  21. "ScopeAttachmentUsage": "Shader"
  22. },
  23. {
  24. "Name": "DirectionalLightShadowmap",
  25. "ShaderInputName": "m_directionalLightShadowmap",
  26. "SlotType": "Input",
  27. "ScopeAttachmentUsage": "Shader",
  28. "ImageViewDesc": {
  29. "IsArray": 1
  30. }
  31. },
  32. {
  33. "Name": "ExponentialShadowmapDirectional",
  34. "ShaderInputName": "m_directionalLightExponentialShadowmap",
  35. "SlotType": "Input",
  36. "ScopeAttachmentUsage": "Shader",
  37. "ImageViewDesc": {
  38. "IsArray": 1
  39. }
  40. },
  41. {
  42. "Name": "ProjectedShadowmap",
  43. "ShaderInputName": "m_projectedShadowmaps",
  44. "SlotType": "Input",
  45. "ScopeAttachmentUsage": "Shader",
  46. "ImageViewDesc": {
  47. "IsArray": 1
  48. }
  49. },
  50. {
  51. "Name": "ExponentialShadowmapProjected",
  52. "ShaderInputName": "m_projectedExponentialShadowmap",
  53. "SlotType": "Input",
  54. "ScopeAttachmentUsage": "Shader",
  55. "ImageViewDesc": {
  56. "IsArray": 1
  57. }
  58. },
  59. {
  60. "Name": "TileLightData",
  61. "SlotType": "Input",
  62. "ShaderInputName": "m_tileLightData",
  63. "ScopeAttachmentUsage": "Shader"
  64. },
  65. {
  66. "Name": "LightListRemapped",
  67. "SlotType": "Input",
  68. "ShaderInputName": "m_lightListRemapped",
  69. "ScopeAttachmentUsage": "Shader"
  70. },
  71. {
  72. "Name": "BaseColor",
  73. "SlotType": "Input",
  74. "ScopeAttachmentUsage": "Shader",
  75. "ShaderInputName": "m_baseColor"
  76. },
  77. {
  78. "Name": "RoughnessMetal",
  79. "SlotType": "Input",
  80. "ScopeAttachmentUsage": "Shader",
  81. "ShaderInputName": "m_roughnessMetal"
  82. },
  83. {
  84. "Name": "Normal",
  85. "SlotType": "Input",
  86. "ScopeAttachmentUsage": "Shader",
  87. "ShaderInputName": "m_normal"
  88. },
  89. {
  90. "Name": "DepthStencil",
  91. "SlotType": "Input",
  92. "ScopeAttachmentUsage": "DepthStencil"
  93. },
  94. {
  95. "Name": "InputDepthStencil",
  96. "SlotType": "Input",
  97. "ShaderInputName": "m_depthStencilTexture",
  98. "ScopeAttachmentUsage": "Shader",
  99. "ImageViewDesc": {
  100. "AspectFlags": [
  101. "Depth"
  102. ]
  103. }
  104. },
  105. // Outputs...
  106. {
  107. "Name": "DiffuseOutput",
  108. "SlotType": "Output",
  109. "ScopeAttachmentUsage": "RenderTarget",
  110. "LoadStoreAction": {
  111. "ClearValue": {
  112. "Value": [
  113. 0.0,
  114. 0.0,
  115. 0.0,
  116. 0.0
  117. ]
  118. },
  119. "LoadAction": "Clear"
  120. }
  121. },
  122. {
  123. "Name": "SpecularOutput",
  124. "SlotType": "Output",
  125. "ScopeAttachmentUsage": "RenderTarget",
  126. "LoadStoreAction": {
  127. "ClearValue": {
  128. "Value": [
  129. 0.4000000059604645,
  130. 0.4000000059604645,
  131. 0.4000000059604645,
  132. 0.0
  133. ]
  134. },
  135. "LoadAction": "Clear"
  136. }
  137. },
  138. {
  139. "Name": "AlbedoOutput",
  140. "SlotType": "Output",
  141. "ScopeAttachmentUsage": "RenderTarget",
  142. "LoadStoreAction": {
  143. "ClearValue": {
  144. "Value": [
  145. 0.0,
  146. 0.0,
  147. 0.0,
  148. 0.0
  149. ]
  150. },
  151. "LoadAction": "Clear"
  152. }
  153. },
  154. {
  155. "Name": "SpecularF0Output",
  156. "SlotType": "Output",
  157. "ScopeAttachmentUsage": "RenderTarget",
  158. "LoadStoreAction": {
  159. "ClearValue": {
  160. "Value": [
  161. 0.0,
  162. 0.0,
  163. 0.0,
  164. 0.0
  165. ]
  166. },
  167. "LoadAction": "Clear"
  168. }
  169. }
  170. ],
  171. "ImageAttachments": [
  172. {
  173. "Name": "DiffuseImage",
  174. "SizeSource": {
  175. "Source": {
  176. "Pass": "Parent",
  177. "Attachment": "PipelineOutput"
  178. }
  179. },
  180. "MultisampleSource": {
  181. "Pass": "This",
  182. "Attachment": "DepthStencil"
  183. },
  184. "ImageDescriptor": {
  185. "Format": "R16G16B16A16_FLOAT",
  186. "SharedQueueMask": "Graphics",
  187. "BindFlags": [
  188. "ShaderReadWrite",
  189. "Color"
  190. ]
  191. }
  192. },
  193. {
  194. "Name": "SpecularImage",
  195. "SizeSource": {
  196. "Source": {
  197. "Pass": "Parent",
  198. "Attachment": "PipelineOutput"
  199. }
  200. },
  201. "MultisampleSource": {
  202. "Pass": "This",
  203. "Attachment": "DepthStencil"
  204. },
  205. "ImageDescriptor": {
  206. "Format": "R16G16B16A16_FLOAT",
  207. "SharedQueueMask": "Graphics"
  208. }
  209. },
  210. {
  211. "Name": "AlbedoImage",
  212. "SizeSource": {
  213. "Source": {
  214. "Pass": "Parent",
  215. "Attachment": "PipelineOutput"
  216. }
  217. },
  218. "MultisampleSource": {
  219. "Pass": "This",
  220. "Attachment": "DepthStencil"
  221. },
  222. "ImageDescriptor": {
  223. "Format": "R8G8B8A8_UNORM",
  224. "SharedQueueMask": "Graphics"
  225. }
  226. },
  227. {
  228. "Name": "SpecularF0Image",
  229. "SizeSource": {
  230. "Source": {
  231. "Pass": "Parent",
  232. "Attachment": "PipelineOutput"
  233. }
  234. },
  235. "MultisampleSource": {
  236. "Pass": "This",
  237. "Attachment": "DepthStencil"
  238. },
  239. "ImageDescriptor": {
  240. "Format": "R8G8B8A8_UNORM",
  241. "SharedQueueMask": "Graphics"
  242. }
  243. },
  244. {
  245. "Name": "BRDFTexture",
  246. "Lifetime": "Imported",
  247. "AssetRef": {
  248. "FilePath": "Textures/BRDFTexture.attimage"
  249. }
  250. }
  251. ],
  252. "Connections": [
  253. {
  254. "LocalSlot": "DiffuseOutput",
  255. "AttachmentRef": {
  256. "Pass": "This",
  257. "Attachment": "DiffuseImage"
  258. }
  259. },
  260. {
  261. "LocalSlot": "SpecularOutput",
  262. "AttachmentRef": {
  263. "Pass": "This",
  264. "Attachment": "SpecularImage"
  265. }
  266. },
  267. {
  268. "LocalSlot": "AlbedoOutput",
  269. "AttachmentRef": {
  270. "Pass": "This",
  271. "Attachment": "AlbedoImage"
  272. }
  273. },
  274. {
  275. "LocalSlot": "SpecularF0Output",
  276. "AttachmentRef": {
  277. "Pass": "This",
  278. "Attachment": "SpecularF0Image"
  279. }
  280. },
  281. {
  282. "LocalSlot": "BRDFTextureInput",
  283. "AttachmentRef": {
  284. "Pass": "This",
  285. "Attachment": "BRDFTexture"
  286. }
  287. },
  288. {
  289. "LocalSlot": "FullscreenShadow",
  290. "AttachmentRef": {
  291. "Pass": "PipelineGlobal",
  292. "Attachment": "FullscreenShadowBuffer"
  293. }
  294. }
  295. ],
  296. "PassData": {
  297. "$type": "FullscreenTrianglePassData",
  298. "ShaderAsset": {
  299. // TODO(DeferredPOC): Make the pass system support source-relative paths
  300. "FilePath": "Passes/PrototypeDeferredPipeline/DeferredLighting.shader"
  301. },
  302. "PipelineViewTag": "MainCamera"
  303. }
  304. }
  305. }
  306. }