The problem was that the stroke array was not reset for
each iteration of the loop, so the second time around,
the array was not initialized correctly and
was left with a NaN value.
The USD Preview Surface material import feature is now considered
stable, so this patch removes this option from the Experimental
category in the UI.
The Import USD Preview option is now enabled by default.
The Experimental box has been removed.
A new Materials box has been added to group the Import
USD Preview Surface, Set Material Blend and Material
Collision Mode options.
Reviewed by: Sybren
Differential Revision: https://developer.blender.org/D17053
Rewrite of the Workbench engine using C++ and the new Draw Manager API.
The new engine can be enabled in Blender `Preferences > Experimental > Workbench Next`.
After that, the engine can be selected in `Properties > Scene > Render Engine`.
When `Workbench Next` is the active engine, it also handles the `Solid` viewport mode rendering.
The rewrite aims to be functionally equivalent to the current Workbench engine, but it also includes some small fixes/tweaks:
- `In Front` rendered objects now work correctly with DoF and Shadows.
- The `Sampling > Viewport` setting is actually used when the viewport is in `Render Mode`.
- In `Texture` mode, textured materials also use the material properties. (Previously, only non textured materials would)
To do:
- Sculpt PBVH.
- Volume rendering.
- Hair rendering.
- Use the "no_geom" shader versions for shadow rendering.
- Decide the final API for custom visibility culling (Needed for shadows).
- Profile/optimize.
Known Issues:
- Matcaps are not loaded until they’re shown elsewhere. (e.g. when opening the `Viewort Shading` UI)
- Outlines are drawn between different materials of the same object. (Each material submesh has its own object handle)
Reviewed By: fclem
Maniphest Tasks: T101619
Differential Revision: https://developer.blender.org/D16826
Improve handling for cases where maximum in-flight command buffer count is exceeded. This can occur during light-baking operations. Ensures the application handles this gracefully and also improves workload pipelining by situationally stalling until GPU work has completed, if too much work is queued up.
This may have a tangible benefit for T103742 by ensuring Blender does not queue up too much GPU work.
Authored by Apple: Michael Parkin-White
Ref T96261
Ref T103742
Depends on D17018
Reviewed By: fclem
Maniphest Tasks: T103742, T96261
Differential Revision: https://developer.blender.org/D17019
Required by Metal backend to have correct usage flags for textures which are read by host.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D17020
Affecting render output preview when tone mapping is used, and EEVEE scenes such as Mr Elephant rendering in pink due to missing shaders.
Authored by Apple: Michael Parkin-White
Ref T103635
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T103635, T96261
Differential Revision: https://developer.blender.org/D16923
AMD GPUs do not appear to produce consistent results with other GPUs when using textureGather in the Metal backend. Disabling for now to ensure correct function of outline rendering.
This may require an additional sub-pixel offset in the texture sampling calls, to achieve correct behaviour.
Authored by Apple: Michael Parkin-White
Ref T103412
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T103412, T96261
Differential Revision: https://developer.blender.org/D16934
This patch fixes an issue where Blender 3.5 alpha with the Metal GPU backend enabled on Japanese macOS fails to compile shaders and crashes on startup.
In a Japanese environment, `defaultCStringEncoding` is the legacy MacJapanese encoding, and it erroneously converts backslashes (0x5c) to Yen symbols (¥).
Therefore, Metal shader compile fails with the following log and Blender crashes.
```
2022-12-29 13:50:10.200 Blender[13404:246707] Compile Error - Metal Shader Library (Stage: 0), error Error Domain=MTLLibraryErrorDomain Code=3 "program_source:225:74: error: non-ASCII characters are not allowed outside of literals and identifiers
template<typename T, access A = access::sample> struct STRUCT_NAME { ¥
^
program_source:226:14: error: no template named 'TEX_TYPE'
thread TEX_TYPE<T, A> *texture; ¥
^
program_source:226:39: error: non-ASCII characters are not allowed outside of literals and identifiers
thread TEX_TYPE<T, A> *texture; ¥
^
program_source:227:29: error: non-ASCII characters are not allowed outside of literals and identifiers
thread sampler *samp; ¥
^
...
```
We can use `stringWithUTF8String` instead.
Reviewed By: fclem, MichaelPW
Differential Revision: https://developer.blender.org/D16881
In the new Draw Manager, when the same DrawGroup has both front and back facing instances, the front facing instances don't offset their indices accordingly.
Differential Revision: https://developer.blender.org/D17069
This changes `make update` to download the assets repository automatically
if it does not exist already. If it does exist, it is updated. Precompiled libraries
have the same behavior. This is required for T103620.
`pipeline_config.yaml` is updated as well for the builtbot.
Differential Revision: https://developer.blender.org/D17090
The call to BKE_volume_grid_openvdb_for_write() was accidentally removed
in D15806. This adds it to BKE_volume_grid_transform_matrix_set() to
avoid that it happens again when that function is used.
Differential Revision: D16949
The code in questions comes from Shewchuk's triangle code, which
hasn't been updated to fix the out-of-buffer access problem
that ASAN finds in the delaunay unit test. The problem is benign:
the code would exit the loop before using the value fetched from
beyond the end of the buffer, but to make ASAN happy, I put in
a couple extra tests to not fetch values that aren't going to be used.
There's a compromise of a code parameter called BEVEL_GOOD_ANGLE,
and bugs T44961, T86768, T95335, and this one, are all about problems
with various values of that parameter. If an angle of an adjacent
non-beveled edge is too close to that of the beveled edge, then you
get spikes. The BEVEL_GOOD_ANGLE says that if you are within that
angle difference, then no bevel happens. If the value is too small
then one gets spikes for certain models people build; if the value
is too large, then other people are annoyed that no bevel happens.
Hopefully this compromise in this commit is the final one I will do
before switching to Bevel v2, where none of this should be an issue.
Regression in [0] caused mouse wheel events over windows without focus
to use the modifier state at the point the window was de-activated.
Now un-focused windows have all events release, when focused again
modifier press events are set again.
[0]: 8bc76bf4b957c51ddc5a13c6305f05c64b218a27
This can improve performance in some circumstances when there are
vectorized and/or unrolled loops. I especially noticed that this helps
a lot while working on D16970 (got a 10-20% speedup there by avoiding
running into the non-vectorized fallback loop too often).
This isn't correct as window activation is handled separately
from the cursor entering/leaving a window.
This would call de-activate when the cursor moved outside the window
even though the window remained focused.
Rely on focus changes which already handle activate/deactivate events.
Caused by {rB841df831e89d} and {rB3558bb8eae75}.
These commits moved flags from `eLineArtGPencilModifierFlags` to
`eLineartMainFlags`, but later on in code, these were still evaluated
from the modifiers `flags` (instead of `calculation_flags`).
This resulted in a false condition (`match_output` was assumed true but
it wasnt), leading to a wrong codepath taken.
This is now corrected (`calculation_flags` need to be passed around for
this as well).
Maniphest Tasks: T103887
Differential Revision: https://developer.blender.org/D17062
This also fixes the layout of boolean properties with the field toggle
visible. This was discussed in the most recent geometry nodes submodule
meeting.
This uses the changes from ef68a37e5d55e17adf4c to create IDProperties
for exposed boolean sockets with a boolean type instead of an integer
with a [0,1] range. Existing properties and values are converted
automatically.
For forward compatibility, the properties are switched to the integer
type for saving. Otherwise older versions crash immediately when opening
a newer file. The "Use Attribute" IDProperties aren't changed here,
since that wouldn't have a visible benefit.
Differential Revision: https://developer.blender.org/D12816
This adds 4 collection properties to MeshUVLoopLayer to eventually replace the (MeshUVLoop) .data property.
The added properties are:
.uv
.vertex_selection
.edge_selection
.pin
The direct access to the separate arrays is much more efficient than the access via MeshUVLoop.
Differential Revision: https://developer.blender.org/D16998
Caused by 05952aa94d33eeb504fa, which removed the use of the
active tessface UV pointer on meshes but didn't replace it properly with
the equivalend custom data API function.
This improves performance in cases where the Set Position node is "turned off"
by passing `false` into the selection input.
It's possible that the node still takes some time in this case currently, because
it is destructing the input fields which may reference geometries that need
to be destructed as well. We could potentially change this node (and others)
so that the field inputs are only requested when the selection is not a
constant `false`.