EEVEE-Next: Optimize GBuffer Layout and writting #115541

Merged
Clément Foucault merged 11 commits from fclem/blender:eevee-next-gbuffer-improvement into main 2023-12-01 14:41:24 +01:00

This layout is more flexible and polymorphic.

While the worst case is worse (4 + 3 layers),
the common case is more optimized (2 + 2 layers).
The average written closure data is also lower
since we can compact the data for special cases
which are quite frequent.

Some adjustment had to be made in the denoise an
tile classify shaders.

Results:

Lit Scene GBuffer Occupancy Before GBuffer Occupancy After

TODOs:

  • Split GBuffer between framebuffer attachment and imageStore.
  • Remove use of stencil buffer.
  • Use GPU_framebuffer_bind_ex for clearing.
  • Add debug visualization.
  • Add optimized GBuffer configurations. (Only dielectric configuration was added as packing other types is currently ineffective or not possible)

Follow-up:

  • Add tile based deferred lighting to replace the stencil based rejection.
This layout is more flexible and polymorphic. While the worst case is worse (4 + 3 layers), the common case is more optimized (2 + 2 layers). The average written closure data is also lower since we can compact the data for special cases which are quite frequent. Some adjustment had to be made in the denoise an tile classify shaders. ### Results: | Lit Scene | GBuffer Occupancy Before | GBuffer Occupancy After | | -------- | -------- | -------- | | ![](https://projects.blender.org/attachments/1669147c-14f0-4bb3-ad0a-0e00c63996f6) | ![](https://projects.blender.org/attachments/f43082d3-f48f-4796-9a41-6ec1593f88e4) | ![](https://projects.blender.org/attachments/392b9dce-3e33-4f30-b3bc-4afcc9a915bb) | ### TODOs: - [x] Split GBuffer between framebuffer attachment and imageStore. - [x] Remove use of stencil buffer. - [x] Use GPU_framebuffer_bind_ex for clearing. - [x] Add debug visualization. - [x] Add optimized GBuffer configurations. (Only dielectric configuration was added as packing other types is currently ineffective or not possible) ### Follow-up: - Add tile based deferred lighting to replace the stencil based rejection.
Clément Foucault added 1 commit 2023-11-28 20:48:37 +01:00
This layout is more flexible and polymorphic.

While the worst case is worse (4 + 3 layers),
the common case is more optimized (2 + 2 layers).
The average written closure data is also lower
since we can compact the data for special cases
which are quite frequent.

Some adjustment had to be made in the denoise an
tile classify shaders.
Clément Foucault changed title from EEVEE-Next: Change GBuffer Layout to EEVEE-Next: Optimize GBuffer Layout and writting 2023-11-28 20:48:57 +01:00
Clément Foucault added the
Interest
EEVEE
label 2023-11-28 20:49:14 +01:00
Clément Foucault added this to the 4.1 milestone 2023-11-28 20:49:18 +01:00
Clément Foucault added this to the EEVEE & Viewport project 2023-11-28 20:49:25 +01:00
Clément Foucault added 1 commit 2023-11-29 19:37:08 +01:00
Clément Foucault force-pushed eevee-next-gbuffer-improvement from 0450c51c74 to 60c841b02d 2023-11-29 20:37:05 +01:00 Compare
Clément Foucault added 1 commit 2023-11-30 01:09:40 +01:00
Clément Foucault added 5 commits 2023-11-30 20:04:15 +01:00
Author
Member

@blender-bot build

@blender-bot build
Clément Foucault added 1 commit 2023-12-01 14:37:51 +01:00
Clément Foucault merged commit fe848ce3ef into main 2023-12-01 14:41:24 +01:00
Clément Foucault deleted branch eevee-next-gbuffer-improvement 2023-12-01 14:41:25 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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 Assignees
1 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#115541
No description provided.