Overlay-Next: Light Probe #125828
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#125828
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "laurynas/blender:overlay-next-lightprobe"
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?
Overlay-Next version of light probe.
Rel #102179
@ -0,0 +143,4 @@
const uint cell_count = prb->grid_resolution_x * prb->grid_resolution_y *
prb->grid_resolution_z;
ps_dots_.push_constant("gridModelMatrix", matrix);
ps_dots_.draw_procedural(GPU_PRIM_POINTS, 1, cell_count, 0, {0}, select_id.get());
First try was put matrices and select_ids into simple
Vector<std::pair<float4x4, select:ID>>
and thenin
LightProbes::end_sync
to calldraw_procedural
for each pair. That way code looked cleaner and onlyPassSimple
was used. But selection by dots didn't work as I couldn't think of a way to getselect_id
in shader passed withdraw_procedural
.This is simpler and more in line with what we want.
You already get a lot of performance saving by doing a procedural draw so batching them together is not saving much.
@ -0,0 +58,4 @@
ps_dots_.shader_set(res.shaders.extra_grid.get());
ps_dots_.bind_ubo("globalsBlock", &res.globals_buf);
ps_dots_.bind_texture("depthBuffer", &res.depth_tx);
ps_dots_.push_constant("isTransform", (G.moving & G_TRANSFORM_OBJ) != 0);
This expression bothers me.
Why? is that the global access that bothers you?
Yes. Thought that there is a replacement like for
G_draw.block_ubo
.If you see no problem, I'm fine too.
For these globals that are supposed to be globals by design (at least for now) that's fine.
WIP: Overlay-Next: Light Probeto Overlay-Next: Light ProbeSome nitpicky comments. Didn't test yet. But code looks good.
@ -122,3 +122,3 @@
theme_color[3] = -max_ff(la.radius, FLT_MIN);
call_buffers_.spot_buf.append(data, select_id);
if ((la.mode & LA_SHOW_CONE) && !DRW_state_is_select()) {
if ((la.mode & LA_SHOW_CONE) && selection_type_ != SelectionType::ENABLED) {
It is better to test against
DISABLED
in case we add more enum types. Also it is clearer to test equality in general.@ -764,0 +786,4 @@
constexpr float sin_pi_3 = 0.86602540378f;
constexpr float cos_pi_3 = 0.5f;
const Array<float2, 6> points = {
float2{0.0f, 1.0f} * r,
We tend to prefer
float2(0.0f, 1.0f)
as it matches our type cast style : https://developer.blender.org/docs/handbook/guidelines/c_cpp/#c-type-castArguably this is not written anywhere. But
float2(
returns 1000+ matches in the codebase whilefloat2{
only 50+. So I would rather keep it consistent.This can be done in a followup cleanup commit to fix all occurences inside overlay next.
@ -764,0 +833,4 @@
}
/* lightprobe_grid */
{
empty line
@blender-bot build