Fix: Draw: EEVEE-Next shadow flickering and other uninitialized bounds fixes #120591
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120591
Loading…
Reference in New Issue
No description provided.
Delete Branch "pragma37/blender:pull-draw-fix-uninitialized-bounds"
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?
Always check if the DrawManager ObjectBounds are valid.
Initialized invalid bounds to NaN in debug builds for easier debugging.
@blender-bot package
Package build started. Download here when ready.
As discussed on blender chat, I would rather see this fixed at the consumer shaders level than trying to not invoke the consumer shaders. We should have some utility functions to check if the bounds are corrects (bounding sphere and bounding box).
Pros:
Cons:
@ -904,2 +904,4 @@
}
const ObjectBounds &bounds =
inst_.manager->bounds_buf.current()[resource_handle.resource_index()];
Reading the data of the draw manager is prohibited by design. The fact these members are public are only for them to be used as shader resources.
There is still two occurrences of
if (bounds.bounding_sphere.w != -1.0) {
insidedraw/intern/shaders
@ -205,1 +205,4 @@
inline bool drw_bounds_are_valid(ObjectBounds bounds)
{
return bounds.bounding_sphere.w != -1.0f;
bounds.bounding_sphere.w == -1.0f
only means the culling is disabled (which does not always means the bounding box is invalid (see snippet).Maybe set it to
-2
when bounding box is invalid.At the moment disabling culling effectively means the bounding box is invalid, since the only way to disable culling is to create a ResourceHandle without bounds.
Right now culling is only explicitly disabled for objects with invalid bounding boxes (curves and hair), and for the lookdev spheres.
Maybe we need a better design for this.
About the diagonal > 1e12 case, I think is fair to treat those bounds as invalid. That's going to wreak havoc on any system that relies on object bounds.