Commit Graph

8365 Commits

Author SHA1 Message Date
Sergey Sharybin
032a24d8ac Fix Cycles compilation error with OIDN < 2.2
The enumerator values for various GPU compute platforms were
added starting with OIDN 2.0, with the Metal GPU type added
in OIDN 2.2.

This is an alternative fix to ebb781675dd, which does not lead to
unhandled cases in switch statement, and follows the configuration
of OIDN and not Cycles (as OIDN might report devices which are
disabled in local Cycles build).

Pull Request: https://projects.blender.org/blender/blender/pulls/119155
2024-03-07 11:13:41 +01:00
Campbell Barton
0cd414120b Unbreak build on macOS with AppleClang from recent cleanup
Exact an exact match with Clang broke building when the compiler ID
was "AppleClang", reverting parts of [0].

[0]: 6549019ae19cecbea524782054dca0e99cb833b8
2024-03-07 19:56:58 +11:00
Campbell Barton
6549019ae1 Cleanup: use STREQUAL instead of MATCHES for exact comparisons
MATCHES takes a REGEX and searches the input for a match,
this isn't necessary for CMAKE_SYSTEM_PROCESSOR & CMAKE_*_COMPILER_ID.
2024-03-07 17:56:41 +11:00
Campbell Barton
a975c7096a Cleanup: line length in CMake files 2024-03-07 13:26:55 +11:00
Sebastian Parborg
ebb781675d Fix: Add missing ifdef guards for OIDN GPU devices
It is not guaranteed that the GPU variables will be available depending
on the current OIDN configuration
2024-03-06 19:19:23 +01:00
Anthony Roberts
3d5fa7698f Cycles: Add Windows ARM64 support
Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:34 +01:00
Sergey Sharybin
d88686fb2b Cycles: Add debug logging to the OIDN GPU checks
No functional changes, just something that could help troubleshooting
cases when option to use GPU for denoising is grayed out.

Pull Request: https://projects.blender.org/blender/blender/pulls/119123
2024-03-06 14:54:19 +01:00
Brecht Van Lommel
44d418143e Merge branch 'blender-v4.1-release' 2024-03-05 19:55:07 +01:00
Sahar A. Kashi
3e09fbf062 Fix #112983: Cycles HIP-RT crash on deleting all objects
Pull Request: https://projects.blender.org/blender/blender/pulls/118944
2024-03-05 19:52:58 +01:00
Lukas Stockner
14a8149318 Cleanup: Cycles: Remove unused function 2024-03-02 02:16:54 +01:00
Brecht Van Lommel
6788b7e87f Merge branch 'blender-v4.1-release' 2024-02-29 17:55:37 +01:00
Brecht Van Lommel
36c11ee482 Fix #118514: Cycles MetalRT crash with empty scene
Pull Request: https://projects.blender.org/blender/blender/pulls/118907
2024-02-29 17:28:13 +01:00
Brecht Van Lommel
1355285c0e Merge branch 'blender-v4.1-release' 2024-02-29 13:52:19 +01:00
Brecht Van Lommel
1e44d811ac Fix #117485: Crash rendering motion blur with changing curve count
This is not supported so there can be artifacts, but it should not
crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/118859
2024-02-29 13:49:51 +01:00
Alaska
659f05ef28 Fix: Cycles HIP incorrect rendering of clip image textures
This was fixed in the driver quite a while ago:
https://github.com/ROCm/HIP/pull/2229

Ref: #91571
Pull Request: https://projects.blender.org/blender/blender/pulls/118540
2024-02-29 13:49:29 +01:00
Alaska
0a173b942b Cycles: Improve reporting of HIP texture allocation failures
HIP fails to allocate textures, typically when they are too large.
This commit lets the user know what might be causing the issue
rather than providing a confusing internal error message.

Pull Request: https://projects.blender.org/blender/blender/pulls/118239
2024-02-29 13:49:11 +01:00
Xavier Hallade
b8fdef965d Merge branch 'blender-v4.1-release' 2024-02-28 18:25:21 +01:00
Xavier Hallade
98343c0c17 Build: Upgrade Intel Graphics Compiler to 1.0.15468 on Linux
This corresponds the latest stable LTS release:
https://dgpu-docs.intel.com/releases/LTS_803.29_20240131.html

Graphics compiler upgrades require increasing the mininum required
driver (compute-runtime) version to the corresponding one to guarantee
compatibility, which is XX.XX.27642.38 in this release, so we bump this
requirement accordingly.

Fixes #118713

Pull Request: https://projects.blender.org/blender/blender/pulls/118814
2024-02-28 18:24:30 +01:00
Thomas Dinges
2b095c97fa Cycles: Increase minimum target on x86 to SSE4.2
* Compile regular host code with SSE4.2
* Remove the SSE2 kernel, only the SSE4.2 and AVX2 kernel remain

Pull Request: https://projects.blender.org/blender/blender/pulls/118471
2024-02-26 14:49:19 +01:00
Weizhen Huang
95d11b0d33 Fix Cycles area light using MIS when the spread is zero
area light with zero spread was introduced in bf18032977. Such paths can
only be sampled with NEE, so MIS should not be used.
This fixes the discrepancy when Direct Light Sampling is set to MIS or NEE.

Pull Request: #118584
2024-02-23 12:40:48 +01:00
Weizhen Huang
c292d4dbee Fix assigning value to nullptr 2024-02-23 12:29:39 +01:00
Weizhen Huang
63dd44c810 Cleanup: avoid implicit conversion from int to float 2024-02-23 12:28:46 +01:00
Weizhen Huang
92c4a5fa09 Fix Principled Hair Huang wrong TIR condition
`cos_theta_t` was not initialized for TIR case

Thanks Christophe Hery for spotting the bug
2024-02-23 12:28:23 +01:00
Weizhen Huang
65d910aef7 Fix wrong roughness in Principled Hair Huang trrt+ component 2024-02-23 12:28:08 +01:00
Brecht Van Lommel
b0b1c55a49 Merge branch 'blender-v4.1-release' 2024-02-22 19:08:48 +01:00
Alaska
56bfd56735 Fix: Cycles incorrect rendering of certain negative strength lights
This fixes an issue where lights that make use of constant negative strength
emission shaders would render with the absolute of their strength.

Pull Request: https://projects.blender.org/blender/blender/pulls/118541
2024-02-22 19:06:22 +01:00
Weizhen Huang
a3f0ff6184 Cycles: make Principled Hair Huang a near- and far-field model
for a camera ray, compute the actual range of the hair width that the
current pixel covers, and only integrate that subset, to prevent a
ribbon-like appearance in close-up looks.
When the hair covers less than one pixel on the screen or when the ray
is not camera ray, the model works the same as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/116094
2024-02-22 18:18:14 +01:00
Weizhen Huang
8a47c6b169 Cleanup: simplify computation of h_to_gamma() in Principled Hair Huang 2024-02-22 18:18:13 +01:00
Weizhen Huang
1906a14cf3 Refactor: pre-compute valid integration interval in Principled Hair Huang
The valid interval from incoming direction was shared between
`...eval_r()` and `...eval_residual()`, so compute that in `...eval()` instead.
The valid interval from outgoing direction was computed for
`...eval_r()` to further reduce the integration interval. This part is
removed because the check `dot(wo, wm) > 0` is relatively cheap inside the loop.
2024-02-22 18:18:13 +01:00
Weizhen Huang
c592fa14f1 Cycles: adjust normal in Principled Hair Huang to be orthogonal to the tangent
The geometry normal of the curve might not be precisely orthogonal to
the tangent due to interpolation. Previously, the tangent was adjusted
to be orthogonal to the normal. However, the normal is linearly
interpolated, which is less accurate than the tangent computed using Catmull-Rom.
This commit keeps the tangent and adjust the normal instead, besides
better accuracy, it ensures a smooth transition when the cross-section
shifts between circular and elliptical.
2024-02-22 18:18:13 +01:00
Weizhen Huang
1d8ec32473 Fix Cycles area light using MIS when the spread is zero
area light with zero spread was introduced in bf18032977. Such paths can
only be sampled with NEE, so MIS should not be used.
This fixes the discrepancy when Direct Light Sampling is set to MIS or NEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/118584
2024-02-22 17:10:46 +01:00
Weizhen Huang
69f26a7c18 Fix assigning value to nullptr 2024-02-22 15:45:33 +01:00
Weizhen Huang
5782555c47 Merge branch 'blender-v4.1-release' 2024-02-22 12:26:37 +01:00
Weizhen Huang
0007c7a6b2 Fix #115997: Emission sampling setting ignored when not using light tree
if emission sampling is not set, we do not use MIS weight when sampling
from the BSDF, but we were still drawing samples from the light,
resulting in double contribution.

Pull Request: https://projects.blender.org/blender/blender/pulls/118534
2024-02-22 12:24:12 +01:00
Weizhen Huang
6f4ef97962 Cleanup: avoid implicit conversion from int to float 2024-02-22 12:09:58 +01:00
Weizhen Huang
ca389c7b56 Fix Principled Hair Huang wrong TIR condition
`cos_theta_t` was not initialized for TIR case

Thanks Christophe Hery for spotting the bug
2024-02-22 12:09:58 +01:00
Weizhen Huang
0550d864f1 Fix wrong roughness in Principled Hair Huang trrt+ component 2024-02-22 12:09:58 +01:00
Lukas Stockner
06b42313a6 Cleanup: Cycles: Replace cos with cosf 2024-02-20 02:57:29 +01:00
Brecht Van Lommel
0f2064bc3b Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was 4bf6a2e564ad2.
2024-02-19 15:59:59 +01:00
Hans Goudey
81a63153d0 Despgraph: Rename "copy-on-write" to "copy-on-evaluation"
The depsgraph CoW mechanism is a bit of a misnomer. It creates an
evaluated copy for data-blocks regardless of whether the copy will
actually be written to. The point is to have physical separation between
original and evaluated data. This is in contrast to the commonly used
performance improvement of keeping a user count and copying data
implicitly when it needs to be changed. In Blender code we call this
"implicit sharing" instead. Importantly, the dependency graph has no
idea about the _actual_ CoW behavior in Blender.

Renaming this functionality in the despgraph removes some of the
confusion that comes up when talking about this, and will hopefully
make the depsgraph less confusing to understand initially too. Wording
like "the evaluated copy" (as opposed to the original data-block) has
also become common anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/118338
2024-02-19 15:54:08 +01:00
Brecht Van Lommel
05f6a32b18 Merge branch 'blender-v4.1-release' into main 2024-02-19 13:18:27 +01:00
bartus
5d06b7b906 Cycles: Add support for OpenPGL 0.6.0
Replace PGLFieldArguments with FieldConfig class for this version.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/118328
2024-02-19 12:36:04 +01:00
Brecht Van Lommel
7453c5ed67 Merge branch 'blender-v4.1-release' into main 2024-02-16 19:31:31 +01:00
Raul Fernandez
324ff4ddef macOS: Remove unnecessary checks now that minimum version is macOS 11.2
MacOS minimum version is now 11.2 we no longer need to check for lower API versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118388
2024-02-16 19:03:23 +01:00
Campbell Barton
bdd40f167e Merge branch 'blender-v4.1-release' 2024-02-15 11:03:42 +11:00
Hans Goudey
a52323d711 Cleanup: Move BKE_duplilist.hh to C++ 2024-02-14 10:51:46 -05:00
Brecht Van Lommel
088ae8d905 Build: Remove LLVM linking no longer needed by OSL
These are now included in the OSL shared libraries, so no reason to
link against it.

The CMake code for WITH_LLVM remains in case it is useful in the future,
but is not enabled by any Blender feature now.

Pull Request: https://projects.blender.org/blender/blender/pulls/118229
2024-02-14 12:06:52 +01:00
Campbell Barton
156fffbfde Merge branch 'blender-v4.1-release' 2024-02-14 14:29:55 +11:00
Brecht Van Lommel
dd382be067 Fix #118020: Cycles OptiX OSL crashes
Turns out we were not building OSL with OptiX enabled anymore.
Also check now if the OSL builds has OptiX support and if not
disable it in Cycles.

Building OSL with support for this (still) does not require
either the OptiX SDK or CUDA, it only needs LLVM.

Pull Request: https://projects.blender.org/blender/blender/pulls/118234
2024-02-14 03:40:01 +01:00
Damien Picard
1410615079 Nodes: expose multi-input sockets to custom nodes in the Python API
Currently the multi-input sockets are not exposed to the custom nodes
Python API. This makes some features cumbersome to implement if one
wants a node to process an arbitrary number of inputs.
One workaround is to make inputs duplicate themselves when a link is
created, but a proper multi-input would be easier to use for both
add-on developers and users.

This commit exposes a new `use_multi_input` boolean parameter when
creating a new node socket. This makes it possible to declare a
multi-input, while still leaving the existing `is_multi_input`
property read-only so that existing nodes cannot be made unstable.

The parameter is optional so existing scripts stay compatible. It also
raises an error when used on output sockets, since it makes no sense
for those to be multi-input.

The Custom Node Tree Python template was updated to reflect this
change by making one of the inputs of the custom node multi-input.

Pull Request: https://projects.blender.org/blender/blender/pulls/114474
2024-02-12 20:28:56 +01:00