Shadow buffers #68470

Open
opened 2019-08-09 16:39:01 +02:00 by Clément Foucault · 9 comments

In order to reduce Shader register pressure during shading phase, we need to transfer the shadow sampling of opaque surfaces to a fullscreen pass.
We would store 1 or 2 bits per lights (limiting number of shadowed lights per pixels to 32 or 16) and use noise to dither the shadow shape.
The noise would disappear with accumulation.
This idea was explored in this presentation link.
The issue is that this technique will not work for alpha-blended surfaces that will still need the standard shadow code.
Contact shadow and cascade shadows cost could be reduced. This could be the opportunity to remove support for contact shadows for alpha blend surfaces.
This also will permit to have raytraced shadows in the future.

Estimate : 2 weeks

In order to reduce Shader register pressure during shading phase, we need to transfer the shadow sampling of opaque surfaces to a fullscreen pass. We would store 1 or 2 bits per lights (limiting number of shadowed lights per pixels to 32 or 16) and use noise to dither the shadow shape. The noise would disappear with accumulation. This idea was explored in this presentation [link](https://drive.google.com/file/d/19EHLJAfqQECjRRShHyS3mHrg4XFxpCOx/view). The issue is that this technique will not work for alpha-blended surfaces that will still need the standard shadow code. Contact shadow and cascade shadows cost could be reduced. This could be the opportunity to remove support for contact shadows for alpha blend surfaces. This also will permit to have raytraced shadows in the future. Estimate : 2 weeks
Author
Member

Added subscriber: @fclem

Added subscriber: @fclem

Added subscriber: @theElder

Added subscriber: @theElder

Removed subscriber: @theElder

Removed subscriber: @theElder
Contributor

Added subscriber: @KenzieMac130

Added subscriber: @KenzieMac130

Added subscriber: @Grady

Added subscriber: @Grady

In the linked presentation I particularly like page 16 which discusses the benefits of having two shadow maps, one for dynamic objects and one for static objects. In most scenes, most objects are static, most of the time.

Imagine a scene being rendered in Eevee that consists of a detailed environment of a city street, and only two characters animated inside of it standing next to a car, having a conversation from a few different camera angles. For each frame, Eevee would be re-rendering shadow maps that consist of almost identical data every frame for no benefit. If Eevee could retain shadow maps of static objects and dynamic objects separately, even if it requires a bit more memory, the performance boost would be substantial I imagine. An optimisation like that could go a long way to speeding up render times.

Unless Eevee is already doing this and no one has mentioned it to me yet?

But anywho, if that paper is roughly the idea that's being proposed here, perhaps that benefit of that system could also be adopted at the same time.

In the linked presentation I particularly like page 16 which discusses the benefits of having two shadow maps, one for dynamic objects and one for static objects. In most scenes, most objects are static, most of the time. Imagine a scene being rendered in Eevee that consists of a detailed environment of a city street, and only two characters animated inside of it standing next to a car, having a conversation from a few different camera angles. For each frame, Eevee would be re-rendering shadow maps that consist of almost identical data every frame for no benefit. If Eevee could retain shadow maps of static objects and dynamic objects separately, even if it requires a bit more memory, the performance boost would be substantial I imagine. An optimisation like that could go a long way to speeding up render times. Unless Eevee is already doing this and no one has mentioned it to me yet? But anywho, if that paper is roughly the idea that's being proposed here, perhaps that benefit of that system could also be adopted at the same time.

Added subscriber: @geocentric_wage

Added subscriber: @geocentric_wage

Added subscriber: @ktdfly

Added subscriber: @ktdfly

Added subscriber: @Emi_Martinez

Added subscriber: @Emi_Martinez
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:15:32 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#68470
No description provided.