Open SRSaunders opened 3 months ago
Now updated to your latest master with retro rendering modes and crt post processing. The merge was large given the number of changes to master, but fairly straight forward with respect to the new shaders. Fortunately they all fell into the BINDING_LAYOUT_POST_PROCESS_FINAL
binding layout type with its existing renderparm subset. I did not have to make any changes to the mappings, just simply mod the new shaders to add the pc.
preface and include the correct subset.
Here is the updated mapping spreadsheet: Binding to Shader Mapping v5.xlsx
At first I was not sure about the new modes, but now I really like the PSX + Newpixie CRT setting. Feels very 90s!
Yeah the retro modes are something I had in mind for a longer time because there are enough people who lurk into this engine for indie dev and I personally grew up as a kid with the C64, CPC 6128 and Amiga 600. I also thought about forking this project and doing the retro there just for standalone development but everyone is focused on RBDOOM and I don't want to do the marketing and backporting of new features. The PSX rendering isn't done yet. The PSX branch also introduces a new renderparm which is used among many shaders for the vertex snapping and texture warping effects. They will be optional by r_psx* cvars but still be needed for a faithful PSX fake experience.
Thanks for the heads up re your PSX branch and a new renderparm. Is there any way I could have a look at that to understand the implications for this branch and future subset handing?
Updated to be compatible with nvrhi + ShaderMake rebase.
Still depends on https://github.com/RobertBeckebans/nvrhi/pull/6. (this dependency now merged into nvrhi)
r_useVulkanPushConstants
renamed to r_vkUsePushConstants
on merge.
r_useDX12PushConstants
renamed to r_dxUsePushConstants
on merge.
Also set ShaderMake retryCount=20
to recover from any macOS/linux shell failures during parallel SPIRV compilation. Increased from default retryCount=10
to handle doubling of shader combinations due to USE_PUSH_CONSTANTS
.
This PR replaces the performance part of https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/818, which will be closed and not merged.
It has one dependency on nvrhi changes: https://github.com/RobertBeckebans/nvrhi/pull/6 for relaxing nvrhi push constant limits to permit platform-specific runtime checks.(UPDATE: dependency now merged into nvrhi)This fixes the performance part of #763.
Details are as follows:
BINDING_LAYOUT_GBUFFER, BINDING_LAYOUT_GBUFFER_SKINNED, BINDING_LAYOUT_TEXTURE, BINDING_LAYOUT_TEXTURE_SKINNED, BINDING_LAYOUT_WOBBLESKY, BINDING_LAYOUT_SSGI, BINDING_LAYOUT_SSGI_SKINNED, BINDING_LAYOUT_POST_PROCESS
).r_useDX12PushConstants
cvar which is turned off by default. This can optionally be turned on using autoexec.cfg for experimentation.r_useVulkanPushConstants
(default on) which is useful for performance comparisons.Tested on Windows 10 (AMD and Nvidia), Linux Manjaro, and macOS Ventura 13.5
Performance timings for this PR vs. current master, generated using a simple home-made timedemo:
Windows Nvidia System (1070 Ti) DX12: 263 fps before, 360 fps after (with r_useDX12PushConstants = 0) --> significant improvement Vulkan: 218 fps before, 333 fps after --> significant improvement
Windows AMD System (6600 XT) DX12: 295 fps before, 305 fps after (with r_useDX12PushConstants = 0) --> neutral/positive improvement Vulkan: 150 fps before, 160 fps after --> neutral/positive improvement
Linux AMD System (6600 XT) Vulkan: 150 fps before, 270 fps after --> large improvement
macOS AMD System (6600 XT) Vulkan: 77 fps before, 245 fps after --> very large improvement
macOS Apple Silicon System (M1 Air) Vulkan: 6 fps before, 85 fps after --> massive improvement
See on-screen HUD statistics (FPS, GPU Memory, CPU/GPU Relative Usage % for
com_fixedTic = 1
) in the following screenshots showing the independent impact of: a) uniforms buffer subsetting, and b) push constants.Notes re test setup:
macOS Vulkan: Baseline using current master + PR #854 but without this PR:
macOS Vulkan: Impact of uniforms buffer subsetting with push constants disabled:
macOS Vulkan: Impact of uniforms buffer subsetting with push constants enabled:
linux Vulkan: Baseline using current master + PR #854 but without this PR:
linux Vulkan: Impact of uniforms buffer subsetting with push constants disabled:
linux Vulkan: Impact of uniforms buffer subsetting with push constants enabled:
Windows Vulkan: Baseline using current master + PR #854 but without this PR:
Windows Vulkan: Impact of uniforms buffer subsetting with push constants disabled:
Windows Vulkan: Impact of uniforms buffer subsetting with push constants enabled:
Windows DX12: Baseline using current master + PR #854 but without this PR:
Windows DX12: Impact of uniforms buffer subsetting with push constants disabled:
Windows DX12: Impact of uniforms buffer subsetting with push constants enabled: