Is it possible to use one and the same 64bit image as 32bit color and 32bit depth attachments (through "strided views")?

I’d like to create a R32G32 image and write to it in a compute pass first, accessing it through 64bit atomic operations.

In a second pass, which is a render pass, I’d like to use the same image for both, a color attachment and a depth attachment—e.g., the R32 part for depth and the G32 part for color output.

Is that even posible?

In terms of use case, think of Nanite: First software rasterizing via compute using 64bit atomics, then hardware rasterizing into the same depth/color attachments.

No, it is not possible. You could do the depth testing yourself, but you’d lose out on all of the hardware optimizations of that process. But you can’t treat an image as both a color and depth image at the same time.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.