Renderer design
I'm trying to figure out how the pieces should fit so that I can have the following features:
- Shadowmapping
- HDR Lighting / Tonemapping
- An additional overlay that isn't tonemapped
- Multisampling
Here's my design.
1st pass
- render shadow map to tex (srgb, single sample)
2nd pass (use HDR multisample attachment and resolve to single sample)
- 1st subpass render lit scene
- 2nd subpass perform tonemapping/postprocessing
- 3rd subpass draw UI/overlay
Q1: Does my design generally make sense?
Q2: Does my shadow map texture also need to be multisampled to look good? If so, can I render to a multisampled texture but not resolve it, and then use it as an input to my second pass?
Q3: I have been using dynamic rendering, but it seems like I can't do multisampling with that unless I have the VK_EXT_multisampled_render_to_single_sampled extension, which seems pretty thinly supported right now. So that's why I'm going to use regular renderpasses/subpasses. Does this make sense?
Thank you!
Posted Oct 3, 2022, 7:46 PM UTC
Curious- why use sRGB for your shadow map? If you’re working with depth- that should generally be agnostic to any sort of color space. I assume you’re looking for a specific sampling characteristic from the sRGB gamma?
Ah good point. My terminology might be weird, but I was just trying to say that it wouldn't be a 16bit floating point texture like I need for color. So I was just trying to say it was a 'regular texture'. But now that I think about it, it's grayscale information, so I don't need R G and B.