There is no need to create callback members for the snap system when
only one type of object is using them.
So remove the callbacks and inline the code.
This usually promotes optimization, but in this case, no change in
performance was observed.
This PR adds world lighting to the irradiance cache and allows diffuse materials
to be lit by the world. The scene in the reference image is only lit by an environment
texture.
The reflection probe lib has been split into sampling the world probe and evaluating
the world probe. As evaluating the world probe requires to include more libraries and
data structures that aren't really needed for the irradiance cache shaders.
Pull Request: https://projects.blender.org/blender/blender/pulls/109516
This PR enables cubemap array extension in compute shaders when
supported by the platform. When used the shader must include
cubemap_lib as it contains a fallback implementation when
cubemap arrays aren't supported by the platform.
NOTE: This extension is available in Core Vulkan and doesn't need to be enabled.
Metal doesn't support cubemap arrays and would use the fallback.
Pull Request: https://projects.blender.org/blender/blender/pulls/109546
Small inconsistency leftover from ebb5643e59, 32bbfbb06e and 7ef8389dad
commits.
Weirdly enough that was not a problem on Linux X11, but did cause
issues at leaast on Windows and Linux Wayland.
Also see #103343.
There was one unusual complication due to `openvdb` here. The `BKE_volume.h`
header included `openvdb` but that would not link correctly in rna code. I'm not entirely
sure why any of the openvdb code is actually instantiated, may be an issue in the
`openvdb` headers. The solution is to create a new header that gives access to the
underlying `openvdb` data structure for a `Volume` geometry. This header can't be
included in rna for now, until the linking issues are resolved.
Pull Request: https://projects.blender.org/blender/blender/pulls/109508
Caused by 968ecf6f8b.
The value of the last pivot of the view should not be changed if there
is no selection.
The variable is static precisely because of this.
This shuffle around the UBO bindings of EEVEE-Next,
Workbench-Next and DRW internal.
This patch is based under the assumption that all
the target hardwares have at least 12 UBO slots,
which is already required by the GL 4.3 we aim.
Similar to curves, the ".selection" attribute is used to store selection.
Selection isn't visualized in the viewport yet, but this should be added
at some point anywya. See f89b32382a.
This PR adds world probe baking to Eevee-next. The world is baked to a
cubemap and is used for reflective light in the deferred render pass.
The world probe is baked to a resolution of 2048x2048. In the future this
would become a user facing setting, but wasn't considered essential for
the first implementation.
When updating the world cubemap the world surface shader is reused.
Currently the world surface shader clears many render passes. It was
decided to replace the render passes with dummy textures as the effort
and potential slowdown didn't weigh against the benefit of doing this nicely.
Updating the world reflection probe isn't expected to happen often.
A big difference with Eevee(-legacy) is that the roughness GGX reflection
parameter isn't baked into the texture (as mipmap levels), but is calculated
during shading. This improves accuracy as we don't assume that every
object is an infinitive small sphere. The result has more noise and that
will be tackled after SSR will land.

Pull Request: https://projects.blender.org/blender/blender/pulls/108149
When using `Texture.ensure_cube_array` the resulting texture wasn't actually
layered (array) and when used resulted into incorrect behavior.
Until now this function isn't used, but will be in when Eevee-next
world reflective light PR lands #108149 .
Pull Request: https://projects.blender.org/blender/blender/pulls/109497
This PR adds a new operator to run a node group on object geometry.
Only curves sculpt mode is supported for now, to simplify the design.
A new geometry node editor context to edit operator groups is also
added. This allows changing any node group, rather than only node
groups that are part of the active modifier context.
3D viewport menus are added with any geometry node group
asset in a catalog that contains the `Operator` tag. Currently Blender
must be restarted to refresh the list of available operators.
This is only the first phase of the node group operator feature.
Many more features will be added in next steps.
See #101778
Pull Request: https://projects.blender.org/blender/blender/pulls/108947
`Mouse Input::in val_unproj` was disregarded when resetting the initial
mouse position.
This caused the mouse to return to the previous position before the
`Set Snap Base` after navigating the 3D view.
Usual issue of modifying the data hierarchy while iterating on it in its
outliner representation. And usual fix for this problem (only store data
to be processed during the iteration over Outliner data, and perform the
actual operation in a single call afterwards).
This commit also tries to improve a bit the 'Clear' process when applied
to a bunch of IDs, by iterating several times over the list of IDs to
clear, and only processing 'liboverrides leaves' first. That way, if
clearing a liboverride leaves turn other liboverrides into leaves, then
can also be processed that way, instead of just being reset.
Note that this is a naive and quite imperfect solution though
(dependency islands cannot be handled that way e.g.), this feature needs
a complete re-write at some point to be more complete and consistent.
Don't think this is high priority though, as it is not really that
useful in practice afaik.
Note: This should be backported to 3.6 LTS (and maybe 3.3 LTS if
applicable).
Similar to 5f16e24cc9, this adds support for edit mode
to the point cloud object type, which is currently hidden behind an
experimental option. No interaction is possible yet, for now this
can be used as a testing for a node-group-operator-only mode.
`CD_HAIRLENGTH` is not really a custom data type, it was just used to
specify the hair particle "length" attribute to pass it to EEVEE and
material preview. Because of the "typemap" array in `CustomData`,
it's better not to have this unnecessary type. Instead, use the same
mechanism used to request the active color attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/109449
The internal `use_occlusion_test` option was only being removed if it
was in conjunction with the `Snap to Face` option.
Both test occlusion and Snap to Face are conflicting. In wireframe mode
the objects are not occluded, but Snap to Face can prevent them from
being snapped.
The solution is to prioritize snapping to other non-Face elements but
still allow "Snap to Face" in X-Ray mode.
Since UDIM baking support in 6787cc13d4, the normalization of
diplacement heights was always based on the min/max height detected in
the _last_ tile, which could lead to clipping if the last tile had very
subtle (or no) displacement.
Now getting the min/max is spread across all images.
This also takes the first thread into account for getting the min/max (which for some reason was skipped).
Pull Request: https://projects.blender.org/blender/blender/pulls/109409
Since 3f26bdf840, `text_format_string_literal_find` is used to get the
length of the string literal. This can return -1 though and this can
lead to accessing negative index in the string afterwards.
Now, let `text_format_string_literal_find` return 0 (instead of -1) since 0
is never going to be a valid string length anyways.
Pull Request: https://projects.blender.org/blender/blender/pulls/109441
The new drawing operator uses the `paint_stroke` API which didn't
know about grease pencil yet. This simple change causes the redraw
to happen on every(?) event, which did not happen before.