SkyBoxSubpass.pass 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. "Type": "JsonSerialization",
  3. "Version": 1,
  4. "ClassName": "PassAsset",
  5. "ClassData": {
  6. "PassTemplate": {
  7. "Name": "SkyBoxSubpassExampleTemplate",
  8. "PassClass": "FullScreenTriangle",
  9. "Slots": [
  10. {
  11. "Name": "LightingOutput",
  12. "SlotType": "InputOutput",
  13. "ScopeAttachmentUsage": "RenderTarget",
  14. //"ScopeAttachmentStage": "ColorAttachmentOutput",
  15. "LoadStoreAction": {
  16. "LoadAction": "Load",
  17. "StoreAction": "Store"
  18. }
  19. },
  20. {
  21. "Name": "SkyBoxDepth",
  22. "SlotType": "Input",
  23. "ScopeAttachmentUsage": "SubpassInput",
  24. "ScopeAttachmentStage": "FragmentShader",
  25. // Specifying the AspectFlags is very important
  26. // because we can only sample Depth or Stencil data but not both of them.
  27. "ImageViewDesc": {
  28. "AspectFlags": [
  29. "Depth"
  30. ]
  31. },
  32. "LoadStoreAction": {
  33. "LoadAction": "Load",
  34. "LoadActionStencil": "DontCare",
  35. // For efficiency, no need to Store the depth pixels after this subpass is done.
  36. "StoreAction": "DontCare",
  37. "StoreActionStencil": "DontCare"
  38. }
  39. }
  40. ],
  41. "PassData": {
  42. "$type": "FullscreenTrianglePassData",
  43. "ShaderAsset": {
  44. "FilePath": "Shaders/SubpassExample/SkyBoxSubpass.shader"
  45. },
  46. "BindViewSrg": true
  47. }
  48. }
  49. }
  50. }