Light Linking: Select one of dedicated lights #107739
No reviewers
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107739
Loading…
Reference in New Issue
No description provided.
Delete Branch "Sergey/blender:cycles-light-linking-multiple-light"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before this change the shadow ray for shadow linking was picking the
closest light. Now a random light on the ray is chosen.
This is more noisy than integrating all lights in the direction of the
main path, but this is the only way to properly support complex
scenarios where there are multiple blockers between the shading point
and the light sources, with different linked settings.
Another unfortunate aspect of this change is increased state size.
This is because the light sample needs to be scaled, so some extra
information is needed. From the intersection kernel it is not yet
possible to write to the shadow path state as this intersection kernel
is marked as not generating shadow rays for the performance reasons.
Perhaps proper solution would be to run profiler to see if the current
dedicated light intersection + shading kernel split actually gives
speedup (by allowing the shadow and main path to run in parallel as
much as possible) or if the speedup is neglectable and it is better to
save memory of the state.
Ref #104972
@ -336,0 +350,4 @@
* feature check. */
kernel_assert(kernel_data.kernel_features & KERNEL_FEATURE_SHADOW_LINKING);
if ((isect->prim != PRIM_NONE) && (lcg_step_float(lcg_state) < 1.0f / num_hits)) {
I think this should actually be
lcg_step_float(lcg_state) > 1.0f / num_hits
Edit: Sorry for the noise, was looking into the code while being a bit distracted by other tasks. it is actually probably correct, but need to review it with a bit more focused mind.
Shadow linking: Select one of dedicated lightsto Light Linking: Select one of dedicated lights@ -336,0 +345,4 @@
++num_hits;
#ifdef __SHADOW_LINKING__
if constexpr (!is_main_path) {
CUDA 10 does not support C++17, so can't use
if constexpr
.Leaving it out should give the same result I think.