正在加载视频...

视频加载失败

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 次观看 • 26 天前 •via X (Twitter)

9 条评论

János Turánszki 的头像
János Turánszki26 天前

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.

János Turánszki 的头像
János Turánszki26 天前

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.

János Turánszki 的头像
János Turánszki26 天前

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

Dark Souls Lighting Engine 的头像
Dark Souls Lighting Engine26 天前

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

János Turánszki 的头像
János Turánszki26 天前

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

Dark Souls Lighting Engine 的头像
Dark Souls Lighting Engine26 天前

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

Лякуша Йцукен 的头像
Лякуша Йцукен26 天前

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

Sergei 的头像
Sergei26 天前

Does the resolution of these frustums need to match?

János Turánszki 的头像
János Turánszki26 天前

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

相关视频