EEVEE-Next: Jittered Shadow Transparency #119480
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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.
Blocks
#119526 EEVEE-Next: Fix transparent shadows convergence
blender/blender
Reference: blender/blender#119480
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pragma37/blender:pull-eevee-transparent-shadows"
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?
Smooth transparent shadows by jittering their opacity threshold every sample.
Always enabled on final renders, optionally enabled in the viewport with
scene.eevee.shadow_jittered_transparency
.@blender-bot build +gpu
@ -35,0 +37,4 @@
uniform_buf.pipeline.alpha_hash_scale, noise_offset, g_data.P);
# else
/* A fully random threshold yields cleaner results than the hashed alpha. */
float random_threshold = hash_vec3_to_float(g_data.P * (1.0 + noise_offset));
Isn't reducing
uniform_buf.pipeline.alpha_hash_scale
clean enough?Split this change to its own PR. We have to evaluate all aspect of it. The
transparency_hashed_alpha_threshold
is engineered to be temporally stable which plays nice with TAA.Done: #119526
Nope!
Replying here since I can't attach images on the review comment.
@ -909,2 +913,3 @@
const bool is_initialized = shadow_ob.resource_handle.raw != 0;
if ((handle.recalc != 0 || !is_initialized) && is_shadow_caster) {
if (is_shadow_caster &&
(handle.recalc || !is_initialized || (has_transparent_shadows && jittered_transparency_)))
I don't understand how this can work for render. Object sync only happens once per motion blur step. So was this tested in viewport, viewport render and F12 render?
The correct way to handle this for render, is to add a separate list of
casters_updated
(maybe namedtransparent_casters_updated_
) that is processed once per sample (it must not produce infinite update inside theShadowModule::set_view
do...while
loop).I would also populate this
transparent_casters_updated_
out of thishandle.recalc
case since it doesn't mean the object has moved, so only one bound need to be transformed. You can then processtransparent_casters_updated_
only in render or ifjittered_transparency_
is enabled.As discussed on chat, there was an issue in
ShadowModule
that caused shadow-maps to be re-rendered every sample for image renders.I fixed that issue, and then implemented a separate
jittered_transparent_caster_update_ps_
that runs every sample.27f071fcbc
to556939393e
The force push doesn't contain any change.
I just reverted the last 3 commits, since I've pushed them here by error.
@ -8027,6 +8027,14 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
prop, "Tracing Method", "Select the tracing method used to find scene-ray intersections");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
prop = RNA_def_property(srna, "shadow_jittered_transparency", PROP_BOOLEAN, PROP_NONE);
This is unclear that this is a viewport only setting. I'm wondering what would be better. Also python properties should follow the pythonic naming rule (prefix
use
). So I suggestuse_shadow_jittered_transparency_viewport
.But I wonder if we really need this property. EEVEE legacy didn't refresh the transparent shadows in the viewport at all if soft shadows were disabled.
Also I am now thinking that this is uneeded for things like foliage and other transparent materials that use a very sharp transparency. So would that be a material property instead? That feels overkill.
I think it's needed, otherwise we're pushing users to use an even more expensive setting (that in EEVEE-Next is supposed to be per-light), just to get ok quality transparent shadows.
That's a good point, but this is also an issue for final renders.
I think you are right. And there will be the possibility of setting jittered shadows per light later on anyway.
But I would say that then the setting should be the same for jittered soft shadows and stochastic transparency. So
use_shadow_jittered_transparency_viewport
would simply becomeuse_shadow_jittered_viewport
.I've updated the property names so we don't break compat, but I kept the UI label the same.
We can change it once jittered soft shadows land.
@ -8030,0 +8031,4 @@
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_SHADOW_JITTERED_TRANSPARENCY);
RNA_def_property_ui_text(prop,
"Jittered Shadow Transparency",
"Enable jitterd transparent shadows on the viewport. (Expensive, "
Typo
jittered