Fix: Overlay-Next: Images #130345
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.
Depends on
#130336 Overlay-Next: Use submit_only
blender/blender
Reference: blender/blender#130345
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pragma37/blender:fix-overlay-images"
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?
Several fixes for Camera and Empty images.
3ce933e936
to75166034ee
75166034ee
to69598ce5ea
69598ce5ea
tof5029a5649
f5029a5649
to66262d3d91
66262d3d91
to72b6214125
@ -401,3 +401,3 @@
init_pass(background_ps_, draw_state);
draw_state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA_UNDER_PREMUL;
draw_state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS | DRW_STATE_BLEND_ALPHA_UNDER_PREMUL;
Can you explain these states changes? As the original values are the ones from the legacy code. So I imagined that they would work?
I'm not sure, maybe Legacy rendered the background on a separate texture?
But without this in Next the background images are rendered on top of the main render.
Camera Background images used to be rendered on the default framebuffer, so not on the overlay framebuffer.
So in overlay next term, this correspond to
resources.render(_in_front)_fb
. Add adraw_on_render
method toCameras
.Also don't forget to group the
draw_on_render
together to avoid framebuffer switching.It has been a bit confusing but I think I managed to mimic 100% the Legacy behavior.
"View as render" background images were rendered to the default framebuffer.
Non "View as render" background images were rendered to the overlay framebuffer.
Next Background cleared the overlay framebuffer as part of its pass. The clear had to be moved before the background image passes.
That
DRW_STATE_DEPTH_GREATER
did nothing in Legacy, it draws to a framebuffer without a depth attachment.@ -510,6 +510,7 @@ void Instance::draw(Manager &manager)
draw_layer_color_only(regular, resources.overlay_color_only_fb);
draw_layer_color_only(infront, resources.overlay_color_only_fb);
regular.empties.draw_in_front_images(resources.overlay_color_only_fb, manager, view);
If I remember, there is no regular because they are all in front. But I guess that makes sense to have both.
Nope, that could be the case if we moved the In Front detection to
Instance::object_is_in_front
as I suggested in the chat.Without this change, empties with
OB_EMPTY_IMAGE_DEPTH_FRONT
(that's the Depth setting in the Empty Data panel) but without "Object > Viewport Display > In Front" enabled won't be rendered.