I'm using append/consume buffers to reduce shading work in my path-tracer (immediately shade empty space + emitters in a pre-pass, append the remaining pixels for full processing), and I've heard that I should be using a UAV when I'm accessing through AppendStructuredBuffer<T>
and an SRV when I'm accessing through ConsumeStructuredBuffer
. I haven't seen that claim in any of Microsoft's documentation, but it might explain why my calls to [Consume()] are returning empty data - is it accurate?
Asked
Active
Viewed 401 times
0

Paul Ferris
- 346
- 5
- 17
1 Answers
1
I should have tested myself before I asked - shaders with ConsumeStructuredBuffer
s declared in SRV registers (tN) fail to compile and emit an error saying they're only bindable through UAVs.
My AppendStructuredBuffer
bound through the UAV registers works fine, so it seems like I was just quoting hearsay; unordered-access-views should be used for both HLSL types.

Paul Ferris
- 346
- 5
- 17
-
That sounds like a pretty cool project. Would love to see the results if you ever share anywhere! – Varrak May 14 '18 at 16:22
-
It's almost ready! I'm on the very last stages of implementing BDPT with MIS + PSR, and I should have everything except for volumetrics (subsurface scattering and participating media) done tonight or tomorrow. I'll DM you when I'm finished :) – Paul Ferris May 21 '18 at 04:38
-
That would be awesome :) – Varrak May 22 '18 at 03:57