Commit Graph

13400 Commits

Author SHA1 Message Date
Brecht Van Lommel
14f470cdae Merge branch 'blender-v4.0-release' into main 2023-11-02 19:02:35 +01:00
Brecht Van Lommel
49c3dc9d7f Fix 114336: Cycles crash switching render pass in the viewport 2023-11-02 17:24:54 +01:00
Xavier Hallade
1161455084 Build: upgrade Intel Graphics Compiler on Linux
In order to speedup compilation, we upgrade IGC to 1.0.14828.26 along
with ocloc and the associated dependencies.
We also bump min-driver version accordingly to 26918.

Ref !114341
2023-11-02 22:27:38 +11:00
Sergey Sharybin
317ee3b6ea Merge branch 'blender-v4.0-release' 2023-10-31 17:29:41 +01:00
Sergey Sharybin
4b891b4afe CMake: Give kernel compilation targets access to console
Done by passing USES_TERMINAL to the add_custom_command().

This allows to see sub-command messages early on, before they
are finished executing.

This should help buildbots to "see" that the kernels are still
being compiled and not kill the build because it did not output
anything in a long time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114327
2023-10-31 17:29:03 +01:00
Campbell Barton
3d3b8ae736 Merge branch 'blender-v4.0-release' 2023-10-31 21:36:34 +11:00
Michael Jones
f2bb4c617f Cycles: Apple M3 tuning including hardware raytracing
This PR adds tunings for the [newly announced](https://www.youtube.com/watch?v=ctkW3V0Mh-k) M3 family of chips. In particular, MetalRT will be enabled as the automatic default for intersection testing on M3 and beyond to take advantage of hardware raytracing. This will result in significant path-tracing speedups, as well as faster BVH builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/114296
2023-10-31 11:14:16 +01:00
Jeroen Bakker
e7148fc28e Vulkan: Enable Optional Vulkan 12 Features
`shaderOutputLayer` and `shaderOutputViewportIndex` are optional in
Blender, but when used they should be activated on physical device level.
This wasn't the case and when used the validation layer reported an error.

This PR activates the features when creating the device if the features
are available.

Pull Request: https://projects.blender.org/blender/blender/pulls/114303
2023-10-31 08:37:31 +01:00
Lukas Stockner
d15013b583 Merge branch 'blender-v4.0-release' 2023-10-31 05:48:58 +01:00
Alaska
a15f9e49ec Shader: Only clamp undefined or unsupported inputs of Principled BSDF
Adjust clamping of inputs in the Principled BSDF to avoid errors and
inconsistencies between render engines, while trying to leave as many
inputs as possible unclamped for artisitc purposes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112895
2023-10-31 03:14:04 +01:00
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb0db3b06838a57f7217bc945638d8df.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Brecht Van Lommel
9b2deb37a0 Fix Cycles render not stopping on OpenImageDenoise error
Stop so that render farms do not save an image that failed to be denoised
properly and assume it is correct.
2023-10-30 18:08:34 +01:00
Sergey Sharybin
ecb346d9df Merge branch 'blender-v4.0-release' 2023-10-30 12:49:40 +01:00
Sergey Sharybin
8474716abb Fix description of MetalRT option
Descriptions should not end with a full-stop.

Pull Request: https://projects.blender.org/blender/blender/pulls/114267
2023-10-30 12:48:04 +01:00
Michael Jones
e9ad267151 Cycles: Remove MetalRT experimental status, and add "auto enable" option
_(NOTE: This is a clone of [PR 114067](https://projects.blender.org/blender/blender/pulls/114067), but targeting `blender-v4.0-release` as originally intended)_

This PR removes the "experimental" disclaimer from the MetalRT control now that the unit tests all render correctly with it enabled. As well as "Off" and "On", this adds a third "Auto" setting - a new default which can be used to pick the best option.

Pull Request: https://projects.blender.org/blender/blender/pulls/114232
2023-10-29 14:19:39 +01:00
Campbell Barton
d31c61edee Cleanup: spelling in comments 2023-10-27 12:13:48 +11:00
Miguel Pozo
247491ef0f Merge branch 'blender-v4.0-release' 2023-10-25 18:58:22 +02:00
Michael Jones
af9ffee152 Cycles: Metal: Fix occasional anim corruption (KernelData MD5 refresh bug)
This fixes an issue where animation frames occasionally get corrupted (e.g. when rendering "Pokedstudio" Blender 2.77 splash screen). This happens when the KernelData is refreshed but the MD5 isn't immediately regenerated which can cause the wrong PSO to be selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/114153
2023-10-25 17:47:13 +02:00
Campbell Barton
28394dd42e Merge branch 'blender-v4.0-release' 2023-10-25 21:20:28 +11:00
Campbell Barton
8e38cd9b8f Correct potential error in recent Wayland/LIBDECOR window size change
While the fix worked in my tests, the compositor is allowed to ignore
a requested window state change which could have entered an eternal
loop. Avoid this by limiting the while loop to 2x round-trips.
2023-10-25 21:17:31 +11:00
Campbell Barton
ab1be3bd48 Merge branch 'blender-v4.0-release' 2023-10-25 20:47:41 +11:00
Campbell Barton
dcaeed7522 Fix Wayland/LIBDECOR size on startup when maximized
Even though the window was maximized, the non-maximized size was used.
Since the display size was used the window would be slightly larger,
clipping the status bar in GNOME.
2023-10-25 20:42:27 +11:00
Campbell Barton
6ba74de1f2 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:27 +11:00
Campbell Barton
16551f9201 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:22 +11:00
Campbell Barton
3638aa5b77 Fix Wayland/LIBDECOR assuming a normal window state on startup
As the window state will have been initialized, read the current window
state instead of assuming normal so changes are properly detected.

Also note that the cause of #107314 has been fixed up-stream.
2023-10-25 11:21:17 +11:00
Michael Jones
4e3ee4f026 Cycles: Fix animation hangs/crashes in Metal due to leaking temp objects
This PR adds `@autoreleasepool` blocks around functions that have been observed to create hidden temporary NSObjects, and eventually cause command buffer failures. A couple of allocations needed to be tweaked in order to maintain correct retain/release behaviour. This PR also fixes the command buffer error text to show more useful information.
2023-10-24 23:20:16 +01:00
Michael Jones
af629b8c20 Cycles: Remove MetalRT experimental status, and add "auto enable" option
This PR removes the "experimental" disclaimer from the MetalRT control now that the unit tests all render correctly with it enabled. As well as "Off" and "On", this adds a third "Auto" setting  - a new default which can be used to pick the best option.

Pull Request: https://projects.blender.org/blender/blender/pulls/114067
2023-10-24 14:33:47 +02:00
Campbell Barton
63dc379dcc Merge branch 'blender-v4.0-release' 2023-10-24 11:44:09 +11:00
Campbell Barton
ca32ba33ae Fix #113961: Incorrect window size for new windows on Wayland
When the output wasn't fractionally scaled but the compositor supports
fractional scaling, new windows were smaller than requested.

Caused by [0] which was incorrectly calculating the non-fractional scale
used by LIBDECOR (which isn't accessible via it's API).

Resolve by only using fractional scaling logic when outputs
have a fractional component.

[0]: 3eda5a114f14d14e1a454d97c9e5496247fe6c21
2023-10-24 11:42:18 +11:00
Sebastian Parborg
b77209e617 Merge branch 'blender-v4.0-release' 2023-10-23 15:03:43 +02:00
Sebastian Parborg
72d011a87c Fix: Missing null pointer check in wayland xkb code
Each locale is not guaranteed to have a compose file.
We have to check if the generated table is a null pointer.
2023-10-23 15:00:32 +02:00
Campbell Barton
c8c2343b4b Cleanup: spelling in comments 2023-10-23 10:09:05 +11:00
Campbell Barton
2864c20302 Cleanup: various C++ changes (use nullptr, function style casts) 2023-10-21 21:17:57 +11:00
Dalai Felinto
45fd780dff Cleanup: make format 2023-10-20 19:12:58 +02:00
Dalai Felinto
b6108c5cef Cleanup: make format 2023-10-20 19:11:42 +02:00
Brecht Van Lommel
ac3ae7d452 Merge branch 'blender-v4.0-release' into main 2023-10-20 18:24:15 +02:00
Brecht Van Lommel
ed619559ce Fix #113942: Cycles discontinuities in bump mapping
Revert "Cycles: implement faster #make_orthonormals()"

This reverts commit 51923c09e2674ecfb3aee77fe67b44d97e22be11.

Ref #106053
2023-10-20 17:29:31 +02:00
Hans Goudey
89e3ba4e25 Mesh: Replace auto smooth with node group
Design task: #93551

This PR replaces the auto smooth option with a geometry nodes modifier
that sets the sharp edge attribute. This solves a fair number of long-
standing problems related to auto smooth, simplifies the process of
normal computation, and allows Blender to automatically choose between
face, vertex, and face corner normals based on the sharp edge and face
attributes.

Versioning adds a geometry node group to objects with meshes that had
auto-smooth enabled. The modifier can be applied, which also improves
performance.

Auto smooth is now unnecessary to get a combination of sharp and smooth
edges. In general workflows are changed a bit. Separate procedural and
destructive workflows are available. Custom normals can be used
immediately without turning on the removed auto smooth option.

**Procedural**

The node group asset "Smooth by Angle" is the main way to set sharp
normals based on the edge angle. It can be accessed directly in the add
modifier menu. Of course the modifier can be reordered, muted, or
applied like any other, or changed internally like any geometry nodes
modifier.

**Destructive**
Often the sharp edges don't need to be dynamic. This can give better
performance since edge angles don't need to be recalculated. In edit
mode the two operators "Select Sharp Edges" and "Mark Sharp" can be
used. In other modes, the "Shade Smooth by Angle" controls the edge
sharpness directly.

### Breaking API Changes
- `use_auto_smooth` is removed. Face corner normals are now used
  automatically   if there are mixed smooth vs. not smooth tags. Meshes
  now always use custom normals if they exist.
- In Cycles, the lack of the separate auto smooth state makes normals look
  triangulated when all faces are shaded smooth.
- `auto_smooth_angle` is removed. Replaced by a modifier (or operator)
  controlling the sharp edge attribute. This means the mesh itself
  (without an object) doesn't know anything about automatically smoothing
  by angle anymore.
- `create_normals_split`, `calc_normals_split`, and `free_normals_split`
  are removed, and are replaced by the simpler `Mesh.corner_normals`
  collection property. Since it gives access to the normals cache, it
  is automatically updated when relevant data changes.

Addons are updated here: https://projects.blender.org/blender/blender-addons/pulls/104609

### Tests
- `geo_node_curves_test_deform_curves_on_surface` has slightly different
   results because face corner normals are used instead of interpolated
   vertex normals.
- `bf_wavefront_obj_tests` has different export results for one file
  which mixed sharp and smooth faces without turning on auto smooth.
- `cycles_mesh_cpu` has one object which is completely flat shaded.
  Previously every edge was split before rendering, now it looks triangulated.

Pull Request: https://projects.blender.org/blender/blender/pulls/108014
2023-10-20 16:54:08 +02:00
Brecht Van Lommel
b1b0d7757a Merge branch 'blender-v4.0-release' into main 2023-10-20 16:29:05 +02:00
Brecht Van Lommel
4997c3aae5 Cycles: don't write surface AOVs when there is only a volume shader
These AOVs can get in the way for volume objects that have no real surface.

Ref #113871
2023-10-20 16:16:05 +02:00
Sergey Sharybin
21c8af467d Cleanup: Convert winfunc and utfconv to C++
Basically, the intern/utfconv directory, as well as users of
these headers.

Pull Request: https://projects.blender.org/blender/blender/pulls/113901
2023-10-20 10:27:31 +02:00
Campbell Barton
eaffcee074 Cleanup: remove printf left in by mistake 2023-10-20 17:51:33 +11:00
Campbell Barton
49218f531a Cleanup: format 2023-10-20 14:20:45 +11:00
Campbell Barton
6f197f6df3 Merge branch 'blender-v4.0-release' 2023-10-20 14:00:41 +11:00
Campbell Barton
ce7444fa50 Merge branch 'blender-v4.0-release' 2023-10-20 14:00:36 +11:00
Campbell Barton
57a5c6c4be GHOST/Wayland: add support for dead keys via xkb_compose
Dead keys worked in X11 but not Wayland (or XWayland),
use XKB APIs to support composition.

Resolve #113724.
2023-10-20 13:51:08 +11:00
Alaska
686aece797 Shader: Adjust Coat Tint Color intensity based on Coat Weight
The previous formula for adjusting Coat Tint intensity resulted
in strong tints and sudden colour changes when using a low coat weight.

This commit fixes these issues by mixing between a white tint (no tint)
and the chosen tint based on the Coat Weight.

Pull Request: https://projects.blender.org/blender/blender/pulls/113468
2023-10-20 00:34:24 +02:00
Lukas Stockner
173ba71b6b Merge branch 'blender-v4.0-release' 2023-10-19 13:26:22 +02:00
Lukas Stockner
c71e18054c Fix: Cycles: Non-physical layering weights can lead to negative closures 2023-10-19 13:13:48 +02:00
Campbell Barton
661da427d7 Build: attempt to fix linking error WITH_INPUT_IME & GHOST
Always define WITH_INPUT_IME when IME is enabled so both WM and GHOST
can rely on functions existing when enabled from CMake.
2023-10-19 21:05:27 +11:00