There are fancier possibilities for improvements, like taking ownership
of existing arrays in some cases, but this patch takes a simpler brute
force approach for now.
The first change is to move from the previous loop to using the new
`materialize_compressed_to_uninitialized` method on virtual arrays,
which adds only the selected values to the output. That is a nice
improvement in some cases, corresponding to the "Without Threading"
column in the chart below.
The next change is to call that function in parallel on slices of
the output. To avoid generating too much code, we can avoid
templating based on the type and devirtualizing completely.
The test input is a 4 million point grid, generated by the grid
primitive node. Color and 2D vector attributes were also transferred
to the points.
| Test | Before | Final No Threading | Final | Change |
| --------- | ------ | ------------------ | ------ | ------ |
| All Verts | 209 ms | 186 ms | 170 ms | 0.8x |
| 1% | 148 ms | 143 ms | 133 ms | 0.9x |
| All Faces | 326 ms | 303 ms | 87 ms | 0.27x |
| 1% Faces | 70 ms | 68 ms | 34 ms | 0.49x |
Differential Revision: https://developer.blender.org/D14661
Blender will respect Windows "Dark Mode" setting for title bar color.
See D14847 for details.
Differential Revision: https://developer.blender.org/D14847
Reviewed by Ray Molenkamp
Recently `gpu_shader_3D_smooth_color_frag.glsl` had the uniform declarations removed.
For shaders without `ShaderCreateInfo` that require this source this results in the error:
```
ERROR (gpu.shader): hair_refine_shader_transform_feedback_workaround_create FragShader:
|
54 | fragColor = finalColor;
|
| gpu_shader_3D_smooth_color_frag.glsl:5:0: Error: Use of undeclared identifier 'fragColor'
| gpu_shader_3D_smooth_color_frag.glsl:5:0: Error: Use of undeclared identifier 'finalColor'
|
55 | fragColor = blender_srgb_to_framebuffer_space(fragColor);
|
| gpu_shader_3D_smooth_color_frag.glsl:6:0: Error: Use of undeclared identifier 'fragColor'
| gpu_shader_3D_smooth_color_frag.glsl:6:0: Error: Use of undeclared identifier 'fragColor'
```
So port that shader to use `ShaderCreateInfo`.
Make preview thumbnails of JPEG files in less time and with less RAM.
See D14727 for more details.
Differential Revision: https://developer.blender.org/D14727
Reviewed by Brecht Van Lommel
This patch adds the show_gizmo and show_gizmo_navigate properties to the Image and UV editors.
Image Editor:
{F13026317}
UV Editor:
{F13026319}
VIDEO:
{F13026324}
Reviewed By: #user_interface, campbellbarton
Differential Revision: https://developer.blender.org/D14755
evice_update_preprocess is supposed to detect modified attributes and flag the
device_vector for a copy through device_update_flags. However, since object
attributes are only created in device_update_attributes afterwards, they can't
be included in that check.
Change the function that actually updates the device_vector to tag it as
modified as soon as its content gets updated.
Differential Revision: https://developer.blender.org/D14815
A shader node setup accidentally used the bump normal as emission. Bump
mapping nodes are excluded from light shader evaluation to reduce kernel size
and register pressure, but in that case should write zero instead of leaving
memory uninitialized.
Thanks to Lukas for helping identify the cause.
The coarse polygon count was set to the one of the BMesh instead of
the the one of the mesh used for subdivision, which caused the
compute shaders to output wrong data.
This adds an input to the Subdivision node to specify a field to use
for controling vertex creases. Common code with edge creasing was
extracted into utility functions to avoid redundancy.
Differential Revision: https://developer.blender.org/D14199
Inspired by D12936 and D12929, this patch adds general purpose
"Combine Color" and "Separate Color" nodes to Geometry, Compositor,
Shader and Texture nodes.
- Within Geometry Nodes, it replaces the existing "Combine RGB" and
"Separate RGB" nodes.
- Within Compositor Nodes, it replaces the existing
"Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA"
nodes.
- Within Texture Nodes, it replaces the existing "Combine RGBA" and
"Separate RGBA" nodes.
- Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and
"Separate RGB/HSV" nodes.
Python addons have not been updated to the new nodes yet.
**New shader code**
In node_color.h, color.h and gpu_shader_material_color_util.glsl,
missing methods hsl_to_rgb and rgb_to_hsl are added by directly
converting existing C code. They always produce the same result.
**Old code**
As requested by T96219, old nodes still exist but are not displayed in
the add menu. This means Python scripts can still create them as usual.
Otherwise, versioning replaces the old nodes with the new nodes when
opening .blend files.
Differential Revision: https://developer.blender.org/D14034
Similar issue/solution as in rB5188c14718c5 from this Monday actually,
there may be more of those still lurking around... Quite surprising they
all get reported now, this behavior has been in Blender since years.
The problem was the layer transformation was already applied in the layer and if we apply in the bake, we are doing double transformation.
Differential Revision: https://developer.blender.org/D14844
Unlike 3Dview snapping, UV snapping is always done to the UV closest to
the mouse cursor, no matter the distance.
From the user's point of view, this appears to be an inconsistency (See
{T93538}).
Therefore, set a minimum distance for snapping and, as in 3D View and
highlight the snap with a drawing of a circle.
Release Note: https://wiki.blender.org/wiki/Reference/Release_Notes/3.3/Modeling
Reviewed By: #uv_editing, campbellbarton
Maniphest Tasks: T93538
Differential Revision: https://developer.blender.org/D13873
This patch replaces BMesh conversion into index-based triangle adjacent
lookup method, and use multithread in many steps to speed up object
loading for line art.
Differential Revision: https://developer.blender.org/D14627
Reviewed By: Sebastian Parborg (zeddb)
The issue was that the `NodeTreeRef` acceleration data structure was
rebuild much more often than necessary. That happened because the
Map Range node accidentally tagged the node tree for change even
though it did not actually change.
Differential Revision: https://developer.blender.org/D14842
Now there are two experimental feature options:
* "New Curves Type": Enables the new data type and a couple of tools
that are meant to be in the first release that comes with the new curves object.
* "New Curves Tools": This is only available when the new curve type is available
as well. It mainly exists to keep some tools experimental even after the initial
curves object is release officially.
* For now this only includes the curves edit mode which is not usable yet and
probably won't be for the initial release.
Differential Revision: https://developer.blender.org/D14840
Fixes T97794 (which is a reintroduction of an older issue T67266 that
has been fixed in the python importer, but the fix was not in the C++
one). Some software produces OBJ files with mtllib statements like
mtllib "file name in quotes.mtl", and the new importer was not stripping
the quotes away.
While at it, I noticed that MTLParser constructor was taking a StringRef
and treating it as a zero-terminated string, which is not necessarily
the case. Fixed that by explicitly using a StringRefNull type.
Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D14838
Use `src` and `dst` instead of less common variable names,
less redundant logic, simpler use of const, and "typename"
for template arguments instead of "class".
For example, this can be used to find the indices of all Bezier curves
inside an existing selection. The important part is that it is optimized
for the case when all curves have the same type.
Fix regression described in T97799.
Apply layer transform and layer parenting to all visible frames, i.e. active frame + onion skinning frames.
Reviewed By: #grease_pencil, antoniov
Maniphest Tasks: T97799
Differential Revision: https://developer.blender.org/D14829
When the profile only has one control point, its segment count was
determined incorrectly. There needs to be a special case for a single
control point, when there are no segments even if the curve is cyclic.