Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Some shadow map optimizations for Wicked Engine, now 16 viewports can be fully utilized for multiple lights' shadow draw calls with instancing. 256 dynamic pointlight shadows in Sponza:

15,162 Aufrufe • vor 26 Tagen •via X (Twitter)

9 Kommentare

Profilbild von János Turánszki
János Turánszkivor 26 Tagen

Now even multiple light types can be fitted into one draw: - directional: multiple cascades - point: up to 6 frustums - spot/rect: 1 frustum Previously the viewport instancing only happened for cascades and point lights, separately. Now all of them are batched.

Profilbild von János Turánszki
János Turánszkivor 26 Tagen

Viewports/cameras are created for visible light frustums while they can fit into the 16 available viewports (graphics API limit). Once 16 viewports are full, the scene is rendered once into all viewports. Instancing is used to select SV_ViewportArrayIndex by VS as before.

Profilbild von János Turánszki
János Turánszkivor 26 Tagen

About 5ms CPU time for shadow render in this scene (depends heavily on culling)

Profilbild von Dark Souls Lighting Engine
Dark Souls Lighting Enginevor 26 Tagen

Nice :) If I understand it , instead of geometry shader you are doing multiple instances and selecting the frustum for eg in Pointlights?

Profilbild von János Turánszki
János Turánszkivor 26 Tagen

Yes, the vertex shader gets the camera/viewport index from the instancing data.

Profilbild von Dark Souls Lighting Engine
Dark Souls Lighting Enginevor 26 Tagen

Thanks for the clarification. Love your work on wicked engine.

Profilbild von Лякуша Йцукен
Лякуша Йцукенvor 26 Tagen

*inspects closer* *gets dabbledazed by disco lights* Yeah that seems wicked enough.

Profilbild von Sergei
Sergeivor 26 Tagen

Does the resolution of these frustums need to match?

Profilbild von János Turánszki
János Turánszkivor 25 Tagen

No, resolution is dynamic for each light, depends on its screen size.

Ähnliche Videos