EEVEE-Next: Irradiance Grid smooth transitions #112842

Merged
Miguel Pozo merged 10 commits from pragma37/blender:pull-eevee-next-irradiance-grid-smooth-transitions into main 2023-12-18 16:25:29 +01:00
Member

Smooth the transition at grid bounds.

Before After
Clipboard - 20 de septiembre de 2023 17 48 Clipboard - 20 de septiembre de 2023 17 48-1

The transition size is fixed at 1 grid cell, but it may be useful to expose a user setting for controlling this (?).

Smooth the transition at grid bounds. | Before | After | |---|---| | ![Clipboard - 20 de septiembre de 2023 17 48](/attachments/428373fc-fd4a-4e0c-ae24-46e430b5cab7) | ![Clipboard - 20 de septiembre de 2023 17 48-1](/attachments/c27e2785-05ec-4eca-b789-57c500142ae4) | The transition size is fixed at 1 grid cell, but it may be useful to expose a user setting for controlling this (?).
Miguel Pozo added the
Module
EEVEE & Viewport
label 2023-09-25 13:15:36 +02:00
Miguel Pozo added 1 commit 2023-09-25 13:15:45 +02:00
Miguel Pozo requested review from Clément Foucault 2023-09-25 13:16:00 +02:00
Clément Foucault requested changes 2023-09-26 13:49:22 +02:00
@ -125,0 +139,4 @@
index = i;
#ifndef IRRADIANCE_GRID_UPLOAD
float distance_to_border = min_v3(min(lP, vec3(grids_infos_buf[i].grid_size) - lP));
float noise = utility_tx_fetch(utility_tx, UTIL_TEXEL, UTIL_BLUE_NOISE_LAYER).x;

I don't think a blue noise fetch here is acceptable for performance reason. Use Interlieved Gradient Noise.

I don't think a blue noise fetch here is acceptable for performance reason. Use Interlieved Gradient Noise.
pragma37 marked this conversation as resolved
@ -125,0 +140,4 @@
#ifndef IRRADIANCE_GRID_UPLOAD
float distance_to_border = min_v3(min(lP, vec3(grids_infos_buf[i].grid_size) - lP));
float noise = utility_tx_fetch(utility_tx, UTIL_TEXEL, UTIL_BLUE_NOISE_LAYER).x;
if (distance_to_border < fract(noise + sampling_rng_1D_get(SAMPLING_VOLUME_U))) {

There is a SAMPLING_LIGHTPROBE for that.

There is a `SAMPLING_LIGHTPROBE` for that.
pragma37 marked this conversation as resolved
Miguel Pozo added 3 commits 2023-10-09 17:52:04 +02:00
Clément Foucault approved these changes 2023-10-09 17:58:42 +02:00
Clément Foucault requested changes 2023-10-10 14:46:24 +02:00
@ -141,0 +147,4 @@
index = i;
#ifdef SAMPLING_LIGHTPROBE
float distance_to_border = min_v3(min(lP, vec3(grids_infos_buf[i].grid_size) - lP));
float noise = interlieved_gradient_noise(

Move this out of the loop. We don't want to evaluate this Nth time.

Move this out of the loop. We don't want to evaluate this Nth time.
Author
Member

I've simplified the loop part a bit, but I don't know how to move the interlieved_gradient_noise call out of the loop without decreasing quality.
This is only computed on the volume edges, I don't think the function is that costly?

I've simplified the loop part a bit, but I don't know how to move the interlieved_gradient_noise call out of the loop without decreasing quality. This is only computed on the volume edges, I don't think the function is that costly?

Use same mechanism as closure_select.

Use same mechanism as `closure_select`.
Clément Foucault added the
Interest
EEVEE
label 2023-11-01 12:36:10 +01:00
Miguel Pozo added 3 commits 2023-11-24 18:42:17 +01:00
Miguel Pozo requested review from Clément Foucault 2023-11-24 18:54:23 +01:00
Clément Foucault requested changes 2023-11-25 17:56:42 +01:00
Clément Foucault left a comment
Member

Use same mechanism as closure_select for avoiding recomputing the random value.
Also it is evaluated for each fragment for transparent surfaces so the cost of this matters quite a bit.

Use same mechanism as `closure_select` for avoiding recomputing the random value. Also it is evaluated for each fragment for transparent surfaces so the cost of this matters quite a bit.
Miguel Pozo added 2 commits 2023-11-29 16:36:35 +01:00
Clément Foucault approved these changes 2023-12-01 14:42:35 +01:00
Miguel Pozo added 1 commit 2023-12-18 16:23:55 +01:00
Miguel Pozo merged commit 97785b6fbb into main 2023-12-18 16:25:29 +01:00
Miguel Pozo deleted branch pull-eevee-next-irradiance-grid-smooth-transitions 2023-12-18 16:25:31 +01: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
2 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#112842
No description provided.