Commit Graph

110463 Commits

Author SHA1 Message Date
Clément Foucault
8cd282e48c Merge branch 'blender-v4.2-release' 2024-06-18 15:35:17 +02:00
Clément Foucault
979e142965 Fix: EEVEE: Object holdout not working
This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
  practice)
- Handle transparent materials properly, keeping the
  transparency working.

Fix #123284

Pull Request: https://projects.blender.org/blender/blender/pulls/123315
2024-06-18 15:35:04 +02:00
Jeroen Bakker
71c716d8c0 Vulkan: Fix incorrect texture update
Texture update ignored layered based offsets and extents. This was
an oversight due to misintepreting the API. This fixes uploading the
utility texture of EEVEE and enables correct material shading.

Pull Request: https://projects.blender.org/blender/blender/pulls/123371
2024-06-18 14:58:41 +02:00
Clément Foucault
0dc5abc9e5 Fix: EEVEE: Infinite loop in shadow update
This happened in the following render test:
`render/light/all_light_types_in_volume.blend`

Unfortunately it seems non-deterministic.
To fix this, we change the heuristic to jump
out of the shadow update loop. Also introduce
a upper bound to the number of iteration.

On top of this, add a flush for every loop
to avoid huge command buffer submission.

Thanks @pragma37 for the fix.
2024-06-18 14:55:41 +02:00
Sybren A. Stüvel
eb731c036b Refactor: Anim filtering, avoid passing bDopesheet *ads parameter
In the animation filtering code, avoid passing `bDopesheet *ads` as a
separate parameter. Instead, pass `bAnimContext *ac`. This already
contains the same pointer. Some carefully placed asserts help to
verify that these pointers were indeed the same.

Not only do I think this approach is cleaner, it is a necessary step
for upcoming PRs #123187 and #122672. Those will need a `Main *bmain`
pointer, which is already available in the `bAnimContext` struct.

Mostly this is just dumb search & replace.

- `ads` → `ac->ads`
- `bDopeSheet *ads` parameter → remove, and add `bAnimContext *ac`
  parameter if necessary. That parameter should be the first parameter
  of the function.
- Unused `ads` parameter translates to unused `ac` parameter. Chances
  are, that parameter will be necessary for the `Main *bmain` anyway.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123305
2024-06-18 14:07:12 +02:00
Christoph Lendenfeld
1ab66a6b4f Fix #116138: Hidden bones cannot be active
This PR modifies the check for visibility when selected in the outliner.
With the change the visibility check only affects the selection state, not the active state.
The check has also been swapped with a function call to `ANIM_bone_is_visible_editbone`,
so now correctly works with collection visibility.

This PR also fixes the same issue for `Bone` and `bPoseChannel`

Co-authored-by: Cedric-Hutchings

Pull Request: https://projects.blender.org/blender/blender/pulls/123237
2024-06-18 13:54:36 +02:00
Falk David
f1fa7e180b Remove outdated comment 2024-06-18 12:54:08 +02:00
Clément Foucault
e71ca93031 Fix: EEVEE: Missing barrier in light sorting compute shader
At high light count, this missing barriers would
produce invalid, non-unique `prefix_sum` indices.
This then resulted in some slots inside `out_light_buf`
never written to, leaving undefined data inside them.

If the buffer was cleared to zero, these undefined light
slots would be interpreted as sun lights and the
shadow setup compute pass would critically fail because
of out of bound memory.

Fix #123195
2024-06-18 12:39:27 +02:00
Falk David
fad85d303f Fix #123328: Onion skinning causes change in opacity for current frame
Toggling the layer onion skinning toggle would affect the opacity
of strokes on the current frame.

This was caused by the `get_visible_frames_for_layer` function. It computes
a `frame_id` for all the keyframes that are not the currenty visible
keyframe. To skip over the currently visible keyframe on the layer,
it just compared the start frame of the keyframe with the current
scene frame. This only works if the current frame is over the keyframe,
but not for any frames after (even if the same keyframe is still visible).

The fix computes the start frame of the keyframe under the current frame
first, and then uses that to compare to the start frame during the iteration
over all keyframes. This makes sure that we skip over the currently visible
keyframe in that layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/123358
2024-06-18 12:29:32 +02:00
YimingWu
a62860229c Cleanup: Remove outdated line art comment
The comment for variable layout is outdated, remove this.
2024-06-18 18:12:40 +08:00
Jeroen Bakker
a39545198a Merge branch 'blender-v4.2-release' 2024-06-18 10:58:26 +02:00
Jeroen Bakker
d13682efa8 Cleanup: Fix spelling in EEVEE
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/123355
2024-06-18 10:57:03 +02:00
Jeroen Bakker
b598bd4a6f Merge branch 'blender-v4.2-release' 2024-06-18 10:55:24 +02:00
Jeroen Bakker
c525c0354f EEVEE: Film accumulation workaround for Metal/Intel iGPUs
EEVEE Film accumulation workaround for Metal/Intel iGPUs.

On Metal the Intel iGPUs do not support image read write
on array textures. However this limitation doesn't show
any artifacts when using the compute shader.

This PR is a work around that uses the film_comp shader
to process the film samples, but uses a separate film_copy_frag
shader to read the result and copy them to the frame buffer.

I deliberately didn't include the fix to the film_frag shader
as that would change the read/write resources and could lead
to performance issues for other platforms. Writable resources
are typically slower compared to read only resources.

Some code needed to be duplicated (and not added to `*_lib.glsl`)
as compilers would still raise compilation errors due to imageStore/Load
on incompatible resource access.

The Metal/Intel iGPU is also marked to have limited support as
raytracing and probes still produces big artifacts.

This workaround can be tested on any platform just by setting
`use_compute_ = true` in `Film::sync`

Related to #122361

Pull Request: https://projects.blender.org/blender/blender/pulls/123330
2024-06-18 10:53:53 +02:00
Sybren A. Stüvel
4b2aee0a37 Cleanup: fix compiler warning by removing superfluous parentheses
Change `if ((A == B))` to `if (A == B)` to silence compiler warnings.

No functional changes.
2024-06-18 10:34:33 +02:00
Campbell Barton
cad86f8dec Merge branch 'blender-v4.2-release' 2024-06-18 12:14:48 +10:00
Campbell Barton
c5217b1377 Merge branch 'blender-v4.2-release' 2024-06-18 12:14:46 +10:00
Campbell Barton
b141365fc2 Cleanup: quiet unused variable warning 2024-06-18 12:09:41 +10:00
Campbell Barton
0554ec7ec7 Cleanup: spelling in comments 2024-06-18 12:09:40 +10:00
Lukas Stockner
25d4d645cd UI: Add Color Temperature unit
The current temperature unit adjusts to Celsius or Fahrenheit based on
unit system, but specifically for color temperatures the convention is
to display them in Kelvin, and it'd be strange to e.g. see 11240°F when
opening the white balance panel.

Therefore, this adds a dedicated Color Temperature unit, and uses it
for the two existing blackbody temperature inputs in shader nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123337
2024-06-17 23:50:05 +02:00
Miguel Pozo
0a38a8d56a Merge branch 'blender-v4.2-release' 2024-06-17 19:39:13 +02:00
Miguel Pozo
4093945e9c Cleanup: Use the correct license name
Unlicense is the name of the license, it's not that the code is unlicensed.
2024-06-17 19:37:00 +02:00
Miguel Pozo
50a83d3e0b Fix: BLI_SUBPROCESS_SUPPORT check
Fix compilation on platforms with OpenGL but not BLI_subprocess support.
2024-06-17 19:35:51 +02:00
Clément Foucault
6d375cf7f0 Fix: EEVEE: Wrong thickness for rotated objects
The previous code was using matrix multiplication to
get the local thickness to world thickness.

The correct way is to multiply the local thickness
by the scale of the object (length of each columns
of the object_to_world matrix).
2024-06-17 19:12:24 +02:00
Clément Foucault
b5a9a67dcf Fix: EEVEE: Object holdout not working
This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
  practice)
- Handle transparent materials properly, keeping the
  transparency working.

Fix #123284

Pull Request: https://projects.blender.org/blender/blender/pulls/123315
2024-06-17 19:08:37 +02:00
Hans Goudey
df98aa61bb Nodes: Support hiding labels for string sockets 2024-06-17 13:02:28 -04:00
Miguel Pozo
dde2aa5417 Merge branch 'blender-v4.2-release' 2024-06-17 18:56:59 +02:00
Miguel Pozo
8014b9cbb4 Fix #123183: EEVEE: Optimize velocity geometry buffer
Avoid storing duplicated geometry buffers for instances.

Pull Request: https://projects.blender.org/blender/blender/pulls/123320
2024-06-17 18:55:27 +02:00
Sean Kim
02449b481b Cleanup: Add forward declarations to mesh_brush_common.hh
Pull Request: https://projects.blender.org/blender/blender/pulls/123209
2024-06-17 18:10:02 +02:00
Alaska
08cc73a9bb Fix #123249: Orthographic DOF is influenced by near clip
Fix an issue where the DOF distance in orthographic mode is
specified distance + near clip distance, which can lead to
unpredicable results.

Pull Request: https://projects.blender.org/blender/blender/pulls/123267
2024-06-17 17:45:55 +02:00
Alaska
274da96722 Render: Clamp minimum DOF focus distance
Clamp DOF focus distance to a minimum of 1e-5.
This is to primarily stop focus distances of 0 being used
which would lead to issues in future code changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123310
2024-06-17 17:42:38 +02:00
Brecht Van Lommel
8ce5c2d8cb Fix: Memory leak in Hydra USD delegate 2024-06-17 16:03:41 +02:00
Hans Goudey
966fdae88b Cleanup: Sculpt: Reduce brush code duplication for applying translations
It's unlikely this part will change in most brushes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123263
2024-06-17 15:54:55 +02:00
Bastien Montagne
dd3a1ec095 Fix (unreported) invalid behaviors when copying an ID in a library.
When copying a local ID into a library, or a linked ID into a different
library, the 'linked' tags would not be properly preserved or set, and
the relative file paths would not be properly remapped.

These issues were not currently exposed (no existing code could trigger
them), but some of these fixes are needed for upcoming refactor of the
partial write code.

NOTE: not very happy with the split in library handling between
`BKE_id_copy_in_lib` and `BKE_libblock_copy_in_lib`, this will have to
be solved at some point.

Pull Request: https://projects.blender.org/blender/blender/pulls/123247
2024-06-17 15:07:20 +02:00
Casey Bianco-Davis
3b5cdbad6b GPv3: Add Set Handle Type operator
Adds the ability to change the handle types of points,
this only applies for curves with type bézier.

Pull Request: https://projects.blender.org/blender/blender/pulls/122965
2024-06-17 14:04:04 +02:00
Casey Bianco-Davis
d63b1dd178 GPv3: Add Set Curve Type operator.
Adds the ability to change the curve type of selected strokes.

First steps toward #121574.

Note: Currently there is no way to visually notice any change. This
will be added in subsequent commits.
Pull Request: https://projects.blender.org/blender/blender/pulls/122964
2024-06-17 13:56:13 +02:00
Falk David
10af923eac Grease Pencil: Move GPv3 out of experimental
This removes the experimental flags related to the GPv3 project.

Note that this doesn't remove GPv2 code just yet.
It just exposes GPv3 by default now.

Pull Request: https://projects.blender.org/blender/blender/pulls/122723
2024-06-17 13:50:41 +02:00
Jeroen Bakker
1363eb26ab Merge branch 'blender-v4.2-release' 2024-06-17 13:47:43 +02:00
Miguel Pozo
8e06344576 Merge branch 'blender-v4.2-release' 2024-06-17 13:46:08 +02:00
Jeroen Bakker
832918f9d8 Fix #115344: Generated coordinates for hair psys
When using particle system the generated coordinates where not set.
The reason is that a loose resource handle was created for particle
system that didn't contain enough information to calculate orcos.

This PR will create the object info from its parent object.

Pull Request: https://projects.blender.org/blender/blender/pulls/123307
2024-06-17 13:45:23 +02:00
Miguel Pozo
86bbd2d3a5 Fix #123227 : EEVEE : Ghosting on viewport rendering
Pull Request: https://projects.blender.org/blender/blender/pulls/123308
2024-06-17 13:44:16 +02:00
Clément Foucault
9a6a822dd6 EEVEE-Next: Remove artificial bias
This bias was added when the pixel radius estimation
computation was still broken. This resulted in a shadow
bias way too big in general.

Also fix shadow pixel size being clampped to the wrong
LOD level.

Fix #123295
2024-06-17 12:48:16 +02:00
Miguel Pozo
4f21a4c41b Merge branch 'blender-v4.2-release' 2024-06-17 12:22:57 +02:00
Miguel Pozo
b029608b97 Fix #123285: EEVEE Next: Ray Visibility > Camera
Add the camera visibility to the MaterialKey.
2024-06-17 12:22:30 +02:00
Bastien Montagne
e78b50123f Merge branch 'blender-v4.2-release' 2024-06-17 12:18:29 +02:00
Bastien Montagne
b143cc1885 I18N: Remove 'edit translation' features from the Blender UI.
This feature was not maintained for a long time already, and would have
required a lot of work to make it sensible and usable after 'recent'
changes (like the move to weblate translation platform).

For details see also
https://devtalk.blender.org/t/ui-translation-tools-remove-edit-translation-feature-from-blender-ui-in-4-2lts-release/34947
2024-06-17 12:17:55 +02:00
Aras Pranckevicius
236c22ca3a Merge branch 'blender-v4.2-release' 2024-06-17 12:44:29 +03:00
Aras Pranckevicius
59d98f3314 Fix #123259: VSE alpha over not working with a Mask modifier
A strip was wrongly deemed to be opaque (and thus strips below it
were skipped from rendering), if the strip content was opaque, but
it gained transparency via presence of a Mask modifier.

While at it, I also noticed that a strip could have been wrongly deemed
opaque when it had a Multiplier < 1.0 with "multiply alpha" option
checked under strip Color settings. So fixed that too.

The whole logic of that factored out into is_opaque_alpha_over function
to make the call site clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/123303
2024-06-17 11:43:28 +02:00
Aras Pranckevicius
1535ebff61 Fix: VSE waveform preview does not always clip too loud samples
For very low frequency sounds (the ones where waveform drawing goes into
"line mode"), either of min or max can go outside of -1..+1 range.
The code was assuming that only max could be above +1, and only min
could be below -1. Fix that, and also make "line mode" also apply
red "clipped" color when clipping happens.

Pull Request: https://projects.blender.org/blender/blender/pulls/123246
2024-06-17 11:26:50 +02:00
Jeroen Bakker
f8d95401d9 Merge branch 'blender-v4.2-release' 2024-06-17 09:37:12 +02:00