This is caused by #121137 as the bug disappear if
`can_use_default_cb` returns false.
The issue is caused by the material binning system.
`ShaderKey` uses the `GPUMaterial` to differentiate between
material. But with #121137, different materials can reuse the
same `GPUMaterial`.
The fix is to not reuse the shader for the prepass (even if opaque)
for transmission enabled shaders.
Fix#121343
This parameter was introduced to mitigate shadow tracing
artifacts. These are no longer present since #121317 and
leaving this parameter breaks PBR rules which opens other
issues with shadow disconnected from shading.
Due to recent changes geometry without any vertices could lead to
a division by zero when copying motion vectors.
This PR fixes this by skipping the copy step when there are no
vertices to copy.
Pull Request: https://projects.blender.org/blender/blender/pulls/121516
Caused by 598af45459
Above commit added respect for the NLA strip offset (rightfully so, by
using `ANIM_nla_mapping_apply_fcurve`).
However, when no closest frame was found, the code moved on to the next
FCurve without restoring to the original FCurve --
`ANIM_nla_mapping_apply_fcurve` needs to be called in pairs.
To resolve, now always restore to the original FCurve.
Pull Request: https://projects.blender.org/blender/blender/pulls/121483
This changes the following keyframing functions to return
`SingleKeyingResult`, which is in turn used for better failure
reporting in the higher-level functions that call them:
- `KeyframeStrip::keyframe_insert()`
- `insert_vert_fcurve()`
As a side effect, this also means that
`rna_KeyframeAnimationStrip_key_insert()` can no longer return an
`FCurve *`, and now instead returns a bool indicating success.
This is part of an ongoing progressive refactor to improve error
messages and failure handling in the keyingframing code.
Pull Request: https://projects.blender.org/blender/blender/pulls/121517
The goal of this PR is to remove the per face, NDC space
tracing for shadow maps.
This requires custom occluder extrapolation but in return
removes quite a lot of complexity in other areas, namely:
- No more per face transform before the tracing
- No more per face jittering (fix#119565)
- No more frustum padding (increased maximum precision)
- Better use of 32bit precision shadow map
- Fix#121343
This improve softness at relatively low step count (default 6
is better) and reduces light leaking at very low sample
count (sharper). It makes it more intuitive now that
higher sample count is smoother.
Pull Request: https://projects.blender.org/blender/blender/pulls/121317
For metric units the depth was being rounded to the nearest meter
(in the range of 10-100 meters), increase the precision from 2 to 4
so it's possible to see centimeter precision.
This enables the new lazy module loading behavior introduced in OIDN 2.3,
without breaking compatibility with older versions of OIDN (using separate
code paths).
Also, the detection of OIDN support for devices is now much cleaner, and
devices do not need to be matched by PCI address or device name anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/121362
BKE_mesh_validate is called by mesh.validate() Python API, as well as optionally
when doing file imports. This PR speeds it up a bit:
- Faster face data sorting by using parallel sort instead of qsort,
- One allocation for all face vertex indices, instead of a separate allocation
for each face,
- (more like a fix) Validation no longer adds a MDeformVert layer when there was
none in the input mesh.
- Small cleanups (more const inputs, etc.)
On my Windows/VS2022/Ryzen5950X machine, import time in seconds (validation on
before this PR -> validation on with this PR, validation off):
- USD (Intel Moore Lane): 9.1 -> 6.7, 4.8.
- OBJ (Blender 3.0 splash): 22.7 -> 18.6, 16.5.
Pull Request: https://projects.blender.org/blender/blender/pulls/121413
This adds the same overlay that already exists for the bake node to the simulation output node.
Without this, it's quite hard to see if the simulation zone is baked or not currently.
Pull Request: https://projects.blender.org/blender/blender/pulls/121497
Bezier handles are recalculated in many places in the
animation code. Threading that code can give a performance
boost all over Blender.
This patch only threads a part of the handle calculation code.
`BKE_nurb_handle_smooth_fcurve` can still be run in parallel,
but that's more complicated, so not done in this PR.
Overall this patch mostly benefits code paths that are not already threaded.
------
Performance delta
| Action | Before | After |
| - | - | - |
| `recalcData_graphedit` moving a single key | 1.06 ms | 1.0 ms |
| `recalcData_graphedit` moving 300 keys of a single FCurve | 1.6 ms | 1.4 ms |
| `recalcData_graphedit` moving 300 keys of multiple FCurves | 60 ms | 55 ms |
| `ANIM_animdata_update` when using the Breakdown operator in the GE | 90 ms | 73 ms |
Test file used
https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend
Pull Request: https://projects.blender.org/blender/blender/pulls/119388
Cleanup to avoid unnecessary copies of VArray. This
requires ref-qualifier overloads of dereference operator
of attribute reader and some move operators and constructor
overloads in the code.
Pull Request: https://projects.blender.org/blender/blender/pulls/118437
- Remove meaningless const for by-value arguments in declarations
- Use std::move for strings (otherwise StringRef should be used)
- Move struct to C++ namespace
- Avoid unnecessary namespace specification
- Use static constexpr instead of macros
- Add const for other arguments in function definitions
- Avoid copying struct in for loop
- Remove redundnat "private" in class
This PR fixes the ternary operation to avoid indexing into a cleared
`BitGroupVector`when trying to create an `IndexMask` for a mesh
with no hidden elements.
Pull Request: https://projects.blender.org/blender/blender/pulls/121461
Remove options that are duplicate and change description of options, so
they describe bit better, how timecodes are actually used.
Timecodes in Blender have pretty much nothing in common with more widely
known term "timecode". This confused users (and developers).
There were 5 options of which 3 were exactly same. This commit leaves
user with 3 options:
- Use timecodes for normal seeking/playback - Record Run
- Ensure, that no frame is duplicated or skipped - "Record Run No Gaps"
- Do not use timecodes - "None"
More verbose description was added to the definition in code.
Naming of these timecode types was kept, even if it is incorrect to not
break scripts and habits.
Pull Request: https://projects.blender.org/blender/blender/pulls/121001
Uses `FileHandlers` to handle file drag-n-drop in the space Sequencer, drop-boxes
still remain since they handle Images ID drag-n-drop.
This also allows to open/drag-n-drop multiple files at once.
When drag-and-drop is performed with a single image/movie/sound
file and only the internal `FileHandler` can be used, is used
the internal drop-box api for drag and drop, since it has a nice
drag-and-drop preview.
Pull Request: https://projects.blender.org/blender/blender/pulls/119927
Mistake in a6ebfb05ad, enabled catalog list shouldn't be free'd, it just
needs to be overridden by the duplicated list correctly. Earlier a clear
(but not a free) was necessary, but now it's overridden anyway so no
clearing is needed.