EEVEE-Next: Make light clamping consistent #120866

Merged
Clément Foucault merged 12 commits from fclem/blender:eevee-next-clamping into main 2024-04-22 21:19:11 +02:00

This adds clamping at the light combine stage for both direct
and indirect light.

This allows for clamping direct and indirect light separately.
While direct light clamping might not be very desirable in
EEVEE, it might be wanted to reduce the flickering from distant
shiny bumpy surfaces, or for artistic reason.

Capture d’écran 2024-04-20 à 23.28.16.png

This happens after applying the BSDF throughput just like cycles.
This is done in order to minimize the performance impact and
allows to split the clamp for direct light and indirect light.

The indirect light clamp value is still used in the ray-tracing
pipeline to clamp the ray intensity. But this differs from cycles
as we clamp the ray without the BSDF throughput here. Sphere probe
have the same issues. Some more energy loss is expected compared
to the direct light clamp.

Note that we still clamp the indirect light after applying BSDF
in case the BSDF is scaling the energy up above the threshold.

This also corrects the clamping for volume that now clamps after
applying the scattering term.

Also adds clamping to volume indirect lighting.

Since we use light probe volumes for both surface and volume
indirect lighting, we need to clamp them at sampling time.

TODO:

  • Make raytraced refraction use the unclamped version of the screen radiance below.
  • Make fast deferred path output separate indirect radiance if needed.
  • Add spherical harmonic clamping
  • Fix missing lightprobe update
This adds clamping at the light combine stage for both direct and indirect light. This allows for clamping direct and indirect light separately. While direct light clamping might not be very desirable in EEVEE, it might be wanted to reduce the flickering from distant shiny bumpy surfaces, or for artistic reason. ![Capture d’écran 2024-04-20 à 23.28.16.png](/attachments/30ac5240-ddd0-48ab-80f1-df9602676575) This happens after applying the BSDF throughput just like cycles. This is done in order to minimize the performance impact and allows to split the clamp for direct light and indirect light. The indirect light clamp value is still used in the ray-tracing pipeline to clamp the ray intensity. But this differs from cycles as we clamp the ray without the BSDF throughput here. Sphere probe have the same issues. Some more energy loss is expected compared to the direct light clamp. Note that we still clamp the indirect light after applying BSDF in case the BSDF is scaling the energy up above the threshold. This also corrects the clamping for volume that now clamps after applying the scattering term. Also adds clamping to volume indirect lighting. Since we use light probe volumes for both surface and volume indirect lighting, we need to clamp them at sampling time. #### TODO: - [x] Make raytraced refraction use the unclamped version of the screen radiance below. - [x] Make fast deferred path output separate indirect radiance if needed. - [x] Add spherical harmonic clamping - [x] Fix missing lightprobe update
Clément Foucault added this to the 4.2 LTS milestone 2024-04-20 23:30:30 +02:00
Clément Foucault added the
Interest
EEVEE
label 2024-04-20 23:30:30 +02:00
Clément Foucault added 1 commit 2024-04-20 23:30:38 +02:00
50d29377bf EEVEE-Next: Make light clamping consistent
This adds clamping at the light combine stage for both direct
and indirect light.

This happens after applying the BSDF throughput just like cycles.
This is done in order to minimize the performance impact and
allows to split the clamp for direct light and indirect light.

The indirect light clamp value is still used in the ray-tracing
pipeline to clamp the ray intensity. But this differs from cycles
as we clamp the ray without the BSDF throughput here. Sphere probe
have the same issues. Some more energy loss is expected compared
to the direct light clamp.

Note that we still clamp the indirect light after applying BSDF
in case the BSDF is scaling the energy up above the threshold.

This also corrects the clamping for volume that now clamps after
applying the scattering term.

Also adds clamping to volume indirect lighting.

Since we use light probe volumes for both surface and volume
indirect lighting, we need to clamp them at sampling time.
Clément Foucault added 2 commits 2024-04-21 12:19:14 +02:00
Clément Foucault added 3 commits 2024-04-21 14:22:40 +02:00
Clément Foucault added 1 commit 2024-04-22 00:01:01 +02:00
Clément Foucault added 4 commits 2024-04-22 16:18:07 +02:00
Clément Foucault added 1 commit 2024-04-22 19:53:01 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
b19632716a
Merge branch 'main' into eevee-next-clamping
Author
Member

@blender-bot build

@blender-bot build
Clément Foucault merged commit d44ee7bf11 into main 2024-04-22 21:19:11 +02:00
Clément Foucault deleted branch eevee-next-clamping 2024-04-22 21:19:14 +02:00
Sign in to join this conversation.
No reviewers
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
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#120866
No description provided.