SSCT optimizations and fixes

- Use lower depth LOD as the cone radius increases.
  This is the same technique we use for SAO.
  The better cache access significantly improve performance.
  On a test on Pixel4 at 585MHz, SAO pass improves by 30%.
  This also helps the algorithm scale with the shadow distance.

- Shadow direction/length no longer dependent on aspect-ratio and camera
  orientation.
  This is fixed by doing all the computations in screen-space instead of 
  normalized screen space.

- Shadow parameters are no longer dependent on the field of view.

- Also rename dominantLightShadowing.fs to ssct.fs

- remove zoom parameter, it wasn't very useful.
This commit is contained in:
Pixelflinger
2020-09-28 18:05:40 -07:00
committed by Mathias Agopian
parent 9e01348dd5
commit 583c1c07cf
10 changed files with 58 additions and 55 deletions

View File

@@ -319,7 +319,6 @@ void SimpleViewer::updateUserInterface() {
ImGui::SliderFloat("Intensity##dls", &ssao.ssct.intensity, 0.0f, 10.0f);
ImGui::SliderFloat("Depth bias", &ssao.ssct.depthBias, 0.0f, 1.0f);
ImGui::SliderFloat("Depth slope bias", &ssao.ssct.depthSlopeBias, 0.0f, 1.0f);
ImGui::SliderFloat("Scale", &ssao.ssct.scale, 0.0f, 10.0f);
ImGui::SliderInt("Sample Count", &sampleCount, 1, 32);
ImGuiExt::DirectionWidget("Direction##dls", ssao.ssct.lightDirection.v);
ssao.ssct.sampleCount = sampleCount;