WIP: Overlay Next: Shapes and Extras #109059
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
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.
Dependencies
No dependencies set.
Reference: blender/blender#109059
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pragma37/blender:pull-overlay-next-extras"
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?
Still WIP.
I'm creating the PR for feedback on the code organization, and whether it's a good design to follow for the rest of the engine.
It tries to follow the object-oriented style established in the initial Overlay Next PR, while adding some utility classes to avoid error-prone "boiler-plate" needed for most of the overlay types (
OverlayPasses
andOverlayType
).overlay_next_speaker.hh
is the simplest example.See
overlay_next_light_probe.hh
for a complex one.Took me a while to get accustomed to it.
I think in general that the classes lacks documentations and meaningful naming. That's what makes the whole system a bit hard to understand.
The use of them however, looks clean.
I'm still a bit concern as I'm not sure this makes the code harder or easier to understand. Since this code is supposed to be modified by other developers that are not familiar with drawing concepts, I would prefer if we keep the bar low. But I am unsure what to do about it.
@ -2428,3 +2428,3 @@
({"property": "enable_workbench_next"}, ("blender/blender/issues/101619", "#101619")),
({"property": "use_grease_pencil_version3"}, ("blender/blender/projects/40", "Grease Pencil 3.0")),
({"property": "enable_overlay_next"}, ("blender/blender/issues/102179", "#102179")),
({"property": "use_grease_pencil_version3"}, ("blender/blender/projects/40", "Grease Pencil 3.0")),
Unwanted change
@ -0,0 +60,4 @@
float3 size;
BKE_boundbox_calc_size_aabb(bb, size);
if (boundtype == OB_BOUND_BOX) {
Use
switch
@ -0,0 +362,4 @@
Object *camera_object = DEG_get_evaluated_object(state.depsgraph, v3d->camera);
const bool is_select = state.selection_type != SelectionType::DISABLED;
const bool is_active = (ob == camera_object);
const bool look_through = (is_active && (rv3d->persp == RV3D_CAMOB));
is_camera_view
@ -0,0 +12,4 @@
namespace blender::draw::overlay {
class CollisionPasses : public BoundPassesBase {
I would just merge that with the
BoundPasses
and avoid the base class. This would avoid splitting the drawing buffers.@ -88,0 +108,4 @@
return;
}
const select::ID select_id = resources.select_id(ob_ref);
I would not put the select_id creation there. It would create id for object that might not be drawn. Also it is further for the code that actually uses it.
@ -269,0 +412,4 @@
}
};
class OverlayPasses {
This class is too generic of a name. It should be
GeometryPass
since it is instanciated twice inOverlayType
.@ -269,0 +420,4 @@
PassSimple ps_;
enum ExtraType { DEFAULT, DEFAULT_ALWAYS, BLEND_CULL_FRONT, BLEND_CULL_BACK, MAX };
Document each values. Not sure what's the difference between
DEFAULT
andDEFAULT_ALWAYS
.@ -75,11 +78,44 @@ ShaderModule::ShaderModule(const SelectionType selection_type, const bool clippi
extra_shape = selectable_shader("overlay_extra", [](gpu::shader::ShaderCreateInfo &info) {
info.storage_buf(0, Qualifier::READ, "ExtraInstanceData", "data_buf[]");
I would rename
ExtraInstanceData
toShapeInstanceData
so that we can useShapeInstanceBuf
instead of the less meaningfulExtraInstanceBuf
.Checkout
From your project repository, check out a new branch and test the changes.