Jump to content

GPU performance improvement suggestion: cascaded shadow maps improvements


Recommended Posts

Hi,

This may be a too big of a change, given that Vulkan behaves quite differently in this area. (and/or that this wouldn't be applicable at all when doing ray traced shadows).

This is partly speculation on my side here as well, since I can't know in detail what is going on.

What we are looking at here is a screenshot of the timing of the shadow rendering. From what I can tell, DCS is using a cascaded shadow map technique, which has 4 shadow maps. (and during rendering we seem to choose one, but we do see some artifacts at boundaries here and there).

The rendering (closest focus is done first) is done in the DSV boxes below. But between this rendering, there is a whole bunch of compute dispatches, that don't run in parallel (since they update the same UAV). The results is that these compute dispatches are not using the full width of the GPU (ie, doesn't scale with GPU size), and are therefore very inefficient.

Would it be possible to either use the existing vendor extensions (if the dispatches don't write to the same locations)?

https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__dx.html#gaeb78a97e256f3c6c511451dded3994e5

https://gpuopen-librariesandsdks.github.io/ags/group__dx11_u_a_v_overlap.html

 

Or, alternatively, at the potential use of additional vidmem, use different UAVs for the different shadowmaps, and launch the dispatches in an interleaved fashion? (ie, launch a dispatch for shadow map 0, then for shadow map 1, etc). The idea being that each set of 4 dispatches would then run in parallel, instead of just a single one).  Perhaps even draw all the shadows in a single pass using multiple views.

Given that the shadow map rendering doesn't scale with screen resolution, this reduces the goodness we see from DLSS/FSR.

 

image.png


Edited by _picon
Updated with multiview rendering suggestion.
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Not really, but I have played around with the cascade distances to improve the quality of in cockpit shadows. (essentially, adjust the range to use the highest resolution cascade, to "just" be inside the cockpit (like 1 meter or so), instead of something longer). 

But that is kind of orthogonal to the issue at hand.

Link to comment
Share on other sites

  • 3 weeks later...
В 02.01.2024 в 18:28, _picon сказал:

Привет,

Это может быть слишком большим изменением, учитывая, что Vulkan ведет себя совершенно по-другому в этой области. (и / или что это вообще неприменимо при создании теней с трассировкой лучей).

Отчасти это предположение и с моей стороны, поскольку я не могу знать в деталях, что происходит.

Здесь мы смотрим на скриншот времени рендеринга теней. Насколько я могу судить, DCS использует технику каскадных карт теней, которая включает 4 карты теней. (и во время рендеринга мы, кажется, выбираем один, но мы видим некоторые артефакты на границах тут и там).

Рендеринг (сначала выполняется ближайший фокус) выполняется в полях DSV ниже. Но между этим рендерингом есть целая куча вычислительных операций, которые не выполняются параллельно (поскольку они обновляют один и тот же UAV). В результате эти вычисления распределяются не на всю ширину графического процессора (т. Е. Не масштабируются в соответствии с размером графического процессора) и, следовательно, очень неэффективны.

Можно ли использовать расширения существующих поставщиков (если рассылки не отправляют записи в одни и те же места)?

https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__dx.html#gaeb78a97e256f3c6c511451dded3994e5

https://gpuopen-librariesandsdks.github.io/ags/group__dx11_u_a_v_overlap.html

 

Или, в качестве альтернативы, при потенциальном использовании дополнительной видеозаписи, использовать разные беспилотники для разных карт теней и запускать рассылки поочередно? (т. е. запустить отправку для теневой карты 0, затем для теневой карты 1 и т.д.). Идея в том, что каждый набор из 4 отправлений будет выполняться параллельно, а не только по одному). Возможно, даже нарисуйте все тени за один проход, используя несколько видов.

Учитывая, что рендеринг карты теней не масштабируется в зависимости от разрешения экрана, это снижает качество, которое мы видим от DLSS / FSR.

 

изображение.png

 

How and with what do you profile graphics in dсs?

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...