Commit Graph

110454 Commits

Author SHA1 Message Date
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
Jeroen Bakker
52d72d9fbb Fix #122847: Show Transparent Render Pass
EEVEE has a transparent render pass that renders materials where
the render mode is set to blended. This was introduced when EEVEE-Next
was still in development, but was never fully backported.

This PR adds the missing pieces.

Pull Request: https://projects.blender.org/blender/blender/pulls/123298
2024-06-17 09:35:03 +02:00
Jeroen Bakker
8e2f51af58 Fix #123269: Shadow jittering when navigating
When navigating the viewport, the shadow jittering wasn't always
updated anymore. Regression introduced by e1ee3ed7df

Pull Request: https://projects.blender.org/blender/blender/pulls/123282
2024-06-17 09:34:25 +02:00
YimingWu
30b3bc8f2b Fix #123226: Sound: Ensure camera switch when baking
In `sound_bake_animation_exec`, the camera needs to be ensured each
frame so that marker camera switch can still give correct stereo/surround
effect during render.

Pull Request: https://projects.blender.org/blender/blender/pulls/123294
2024-06-17 10:24:21 +08:00
YimingWu
bf74978260 Fix #123226: Sound: Ensure camera switch when baking
In `sound_bake_animation_exec`, the camera needs to be ensured each
frame so that marker camera switch can still give correct stereo/surround
effect during render.

Pull Request: https://projects.blender.org/blender/blender/pulls/123294
2024-06-17 02:52:52 +02:00
Aras Pranckevicius
71b14a7abe Merge branch 'blender-v4.2-release' 2024-06-16 08:35:14 +03:00
John Kiril Swenson
fca4318e3c Fix: Wrong extra half-pixel width of VSE preview
While implementing preview snapping, I noticed an oddity with snapping
videos to view bounds, and found that the preview window's total v2d has
half a pixel of extra padded width.

The bug was introduced in fb5e2f5610, which added `roundf` calls to
numerous areas in the blender code to replace instances of adding `0.5`
and then casting to an integer.

One mistake in the patch was fixed shortly after in d122911d10, but the
other mistake has been unfixed until now. This fixes the glitchy
behavior with preview snapping and is also small enough to add to 4.2
LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/123279
2024-06-16 07:34:24 +02:00
John Swenson
7b6ae7abbb Fix: VSE glitchy timeline snapping for small mouse movements around valid snap
The issue is that timeline snapping code does not set the transform
`values` to a rounded frame delta, instead, it adds the rounded distance
between current source and target points to the unrounded `values`
float, leaving it unrounded.

Since snapping code is only run on some `transform_modal` calls due to
"time base quirky code" in `transform_snap_mixed_apply`, sometimes
frames briefly show mouse input added to `values` causing the strip to
get transformed away from the snap target before the snap code is run
once again.

To fix this, set transform `values` to the exact rounded snap target
frame diff (like in node snapping) instead of expecting it to get
properly rounded for every call. Do this by changing
`tsnap->snap_source[0]` to the original snap source on `transformInit`,
not the updated snap source.

Pull Request: https://projects.blender.org/blender/blender/pulls/123217
2024-06-16 07:33:35 +02:00
Jacques Lucke
b48370b62d Merge branch 'blender-v4.2-release' 2024-06-15 19:52:07 +02:00
Jacques Lucke
b11d8d2e74 Fix #121559: bad node tree zone visibility with frames
The fix is to support interleaving the drawing of zones and frames.
The draw order is determined by the width of the zones/frames.
Larger areas are drawn before smaller ones. This makes sure that
everything is as visible as possible.

The zone border outlines are still drawn on top of all frames.
Solving that is technically more challenging, because we don't want
to use transparency for zone backgrounds because that results in
many possible mixed colors which we want to avoid. Fortunately,
drawing the outlines on top seems to be quite useful anyway.
2024-06-15 19:51:15 +02:00