Commit Graph

15461 Commits

Author SHA1 Message Date
Michael Jones
5c3a6745a2 Cycles: Forward compatibility for Metal "FastIntersection" flag
Follow on from PR #141891. The `MTLAccelerationStructureUsagePreferFastIntersection` flag didn't exist until Xcode 26.0, so we ensure that it is defined for forward-compatibility. The runtime `if (@available(macos 26.0, *))` checks still remain.

Pull Request: https://projects.blender.org/blender/blender/pulls/147561
2025-10-16 11:50:28 +02:00
Campbell Barton
3099cd2124 Fix #148142: Cannot interact with normal windows (GNOME 48.4)
Resolve regression with GNOME-48 & LIBDECOR caused by fix for GNOME-49
(see !148104).

New normal (non-maximized) windows were not refreshing and ignored
cursor input. Workaround the issue be resetting the title.

See code-comments for details.

Ref !148178
2025-10-16 02:28:38 +00:00
weizhen
6c241737e8 Fix: Cycles volume performance issue on Nvidia
Pass by value instead of reference partially fixes the performance issue
mentioned in #147921

Pull Request: https://projects.blender.org/blender/blender/pulls/147989
2025-10-15 11:23:52 +02:00
Campbell Barton
5f72d112dd Fix #144919: Opening windows hangs on GNOME-49 with Wayland
Opening "normal" windows (non-maximized) windows was hanging.
Blender was waiting for a "configure" event with a valid size,
which stopped being sent in GNOME-49.

Even though GNOME-49.1 will resolve the problem, according to the
GNOME developers Blender's use of Wayland was incorrect.

Resolve the issue with the following changes:

- Don't wait for the `xdg_toplevel` to be when creating new windows.
  Instead, defer setting the window state using logic that was already
  used for Vulkan.
- Set new window's pending size - used if no size is received
  from LIBDECOR's "configure" callback.
- When the window is "configured" always set the window "state"
  even if the size is not yet known.

Ref !148104
2025-10-15 15:25:11 +11:00
Jonas Holzman
e6064b2be3 Fix #134818: macOS: Hidden mouse grab not keeping mouse in window
This commit fixes an issue where WM cursor grabbing, when used
in "hidden" mode (`GHOST_kGrabHide`) would unexpectedly not prevent the
cursor from escaping the Blender window and revealing itself when
hovering over macOS desktop elements like the application Dock.

Looking at the original issue in past Blender versions, testing with the
Walk Navigation operator, this used to work in Blender 3.2, and broke
in Blender 3.3. Bisecting leads to commit 4c4e8cc926 (Fix T99021:
Walk-mode doesn't work in Wayland), which switched the Walk Navigation
mouse warping method from custom `WM_cursor_warp` logic to using
`WM_cursor_grab_{enable/disable}`.

Then, looking at the WM_cursor_grab Cocoa implementation, more
especially at the `GHOST_kGrabHide` case in `handleMouseEvent`, a
comment ("Cursor hidden grab operation : no cursor move") suggests that
hiding the cursor would previously prevent it from moving (possibly in
earlier macOS versions?).

This fix, the simplest I could come up with other than implementing
simple window warping for the `GHOST_kGrabHide` case (similar to what's
done on Windows, see #113066) is to use
`CGAssociateMouseAndMouseCursorPosition` to disable cursor movements
for the duration of the hidden grab, effectively restoring the original
behavior indicated in the comment.

Pull Request: https://projects.blender.org/blender/blender/pulls/148007
2025-10-14 14:31:02 +02:00
Raimund Klink
30fd6537b9 Cycles: Disable the render time pass for GPU
Also, extend the description in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/147054
2025-10-13 15:09:40 +02:00
Alaska
de16ed4e8c Cycles: Improve performance on uneven GPU renders
When a Cycles render is uneven (E.g. a small portion of the image takes
significantly longer to render than the rest of the image), then GPUs
typically suffer from poor performance due to low occupancy unless a
large number of samples is scheduled to compensate for that small
complex region.

Due to how Cycles render scheduler is setup, Cycles tries to
increase GPU occupancy by increasing the number of scheduled samples,
but also balance render preview update time by scaling back
the number of scheduled samples based on the previous workloads time
per sample to try and fit within the target update time.

However using the previous workloads time per sample to scale back the
scheduled number of samples gives suboptimal results because the
previous workloads time per sample is usually not representative of the
new time per sample that occurs as GPU occupancy increases, because
increasing GPU occupancy typically results in reduced time per samples.

This commit improves on this issue by assuming that increasing GPU
occupancy linearly improves performance, and adjusts the function
that scales back the sample count to fit within a specific update
window to use this assumption. This leads to Cycles increasing the
amount of work scheduled onto the GPU quicker at the beginning of
uneven/low occupancy scenes, generally leading to improved performance,
especially when rendering at low sample counts or with strict
time limits.

Ref #147954

Pull Request: https://projects.blender.org/blender/blender/pulls/147950
2025-10-13 14:40:01 +02:00
Weizhen Huang
0b0ea916ff Fix #147846: Cycles: Viewport not updating when changing global step rate
Should also update when the global multiplier changes

Pull Request: https://projects.blender.org/blender/blender/pulls/147968
2025-10-13 12:14:48 +02:00
Damien Picard
a2f94ab1ad Fix #147062: OSL Camera: Aperture size depends on focal length
In OSL custom cameras, the current aperture size depends on the focal
length of the Blender camera, even though it is not usable by the
shader. This gives incoherent values to the depth of field.

To ignore this factor, this commit makes the custom camera behave the
same as the orthographic camera, by not being multiplied by the focal
length.

To compensate for that, the multiplication must happen inside the
shader. This adjustment was done in the advanced camera shader
template.

Pull Request: https://projects.blender.org/blender/blender/pulls/147346
2025-10-13 00:23:25 +02:00
Nikita Sirgienko
38adb8f1a4 Cycles: oneAPI: Fix duplicated GPU device entries on some setups
In some hardware configurations, it is possible that DPC++ or
Intel Drivers wrongfully report all devices twice. It is already
being worked on internally, and the fixes will be available in
the future - but for now, we need a workaround for this problem
in Blender as well, to ensure that our end-users are not impacted.

Pull Request: https://projects.blender.org/blender/blender/pulls/147731
2025-10-10 17:25:29 +02:00
Patrick Mours
b168a833af Cycles: Fix OptiX context log no longer showing up
Commit 8392ca915b removed
WITH_CYCLES_LOGGING, but missed that the OptiX context log was
conditionally compiled depending on that definition, so this fixes
that.

Pull Request: https://projects.blender.org/blender/blender/pulls/147706
2025-10-10 13:15:23 +02:00
Damien Picard
7ec15a3a98 I18n: Use rpt_ instead of tip_ to translate reports
This was the case in:
- FBX add-on
- Cycles OSL
2025-10-09 12:09:56 +02:00
Nikita Sirgienko
b133019f9f Cycles: oneAPI: use ocloc 101.8132 on Windows
This new version of the graphics compiler improves performance
for the majority of supported Intel devices and adds support
for upcoming Intel hardware. Such an upgrade also requires
an increase in the minimal supported driver version on Windows,
which is why these changes are combined together with
the ocloc upgrade.

Previously set minimal version 101.6557 was increased to 101.8132.

Pull Request: https://projects.blender.org/blender/blender/pulls/147460
2025-10-08 13:36:08 +02:00
Campbell Barton
5d671a4ade Cleanup: correct typos & clarify doc-strings for GHOST/Wayland 2025-10-08 13:30:11 +11:00
Campbell Barton
01806a62e3 Cleanup: spelling (make check_spelling_*) 2025-10-07 10:19:46 +11:00
Nikita Sirgienko
c07454a3d7 Cycles: oneAPI: Update UI about minimal driver version on Linux
These changes are already in place de facto, as the check for
the minimal driver version in the Blender code was already
updated. This commit simply adds the UI update, which I
initially forgot to perform.

Pull Request: https://projects.blender.org/blender/blender/pulls/147459
2025-10-06 20:44:20 +02:00
Christoph Neuhauser
72f098248d Cycles: Add Vulkan/oneAPI graphics interop
This PR adds Vulkan/oneAPI graphics interop to Cycles. Just like for
CUDA and HIP interop, persistent memory mapping is used, as there could
potentially be some overhead of continuously mapping/unmapping buffers.

Pull Request: https://projects.blender.org/blender/blender/pulls/144442
2025-10-06 18:16:56 +02:00
Sean Stirling
e12ddede24 Cycles: Disable jumptablerdata cxx option for ARM64 devices compiled with MSVC.
This change disables an x64 specific flag for ARM64 devices when compiling with MSVC.

Pull Request: https://projects.blender.org/blender/blender/pulls/147276
2025-10-06 17:10:08 +02:00
Nikita Sirgienko
49414a72f6 Cycles: oneAPI: Add new arch codes for upcoming Intel hardware
Pull Request: https://projects.blender.org/blender/blender/pulls/147221
2025-10-04 22:34:54 +02:00
Hans Goudey
a68d39e9d9 Cleanup: Formatting
Run `make format` after the library update in the previous commit.
2025-10-02 12:55:42 -04:00
Thomas Dinges
66224d69b0 Deps: Library changes for Blender 5.0
This commit includes the changes to the build system, updated hashes to the actual new libraries as well as a required test update.

* DPC++ 6.2.0 RC
* freetype 2.13.3
* HIP 6.4.5010
* IGC 2.16.0
* ISPC 1.28.0
* libharu  2.4.5
* libpng 1.6.50
* libvpx 1.15.2
* libxml2 2.14.5
* LLVM 20.1.8
* Manifold 3.2.1
* MaterialX 1.39.3
* OpenColorIO 2.4.2
* openexr 3.3.5
* OpenImageIO 3.0.9.1
* openjpeg 2.5.3
* OpenShadingLanguage 1.14.7.0
* openssl 3.5.2
* Python 3.11.13
* Rubber Band 4.0.0
* ShaderC 2025.3
* sqlite 3.50.4
* USD 25.08
* Wayland 1.24.0

Ref #138940

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Co-authored-by: Kace <lakacey03@gmail.com>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Anthony Roberts <anthony.roberts@linaro.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>

Pull Request: https://projects.blender.org/blender/blender/pulls/144479
2025-10-02 18:34:11 +02:00
Stefan Werner
083aad8a45 Cycles: Specialization constants for Embree/SYCL
Making heavier use of specialization constants in SYCL for Embree.
This reduces code size of the intersection kernels and bring
performance improvement up to 9% in some scenes on
Intel GPUs.

Co-authored-by: Stefan Werner <stefan.werner@intel.com>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141559
2025-10-02 16:44:24 +02:00
Campbell Barton
7f36eebf5c Wayland: lower the requirement for the xdg_output_manager for Rocky8
GHOST/Wayland failed to initialize on older versions of GNOME.
Lower the requirement so Blender can start on the build-bot.

Ref !147165
2025-10-02 21:51:23 +10:00
Weizhen Huang
04166ea0ea Cycles: support printf in Metal 15.0
For metal version after 3.2 it's possible to log debugging messages, it
works similar to `printf()`, except for a few differences:
- `%s` is not supported,
- `double` doesn't exist, so no casting to double for `%f`,
- no `\n` needed at the end of the format string.

To see the print in the console, environment variables `MTL_LOG_LEVEL`
should be set to `MTLLogLevelDebug`, and `MTL_LOG_TO_STDERR` should be
set to `1`. See
https://developer.apple.com/documentation/metal/logging-shader-debug-messages

Right now `printf()`, `print_float()`, `print_float2()`,
`print_float3()` and `print_float4()` are supported.

Thanks to @fclem for finding this out.

Pull Request: https://projects.blender.org/blender/blender/pulls/146585
2025-10-01 14:25:44 +02:00
Brecht Van Lommel
b92c96e39b Cleanup: Compiler warnings when building without fluids or openvdb
Pull Request: https://projects.blender.org/blender/blender/pulls/146996
2025-09-30 14:02:16 +02:00
marcopavanello
390f053e32 Fix #146630: Single Scattering Sky has darker pixels near horizon
Store the ground fading of Single Scattering sky directly in the LUT.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146659
2025-09-29 20:56:32 +02:00
Lukas Stockner
fc5c6ab374 Fix #146223: Cycles: Wrong output with multi-device OSL rendering
We used to set shader->osl_surface_ref during shader compilation and then
pushed it into the shared vectors.

This worked as long as everything was serial - but after the multithreading
change, we a) compile everything and then b) build the shared vectors since
just pushing into them from multiple threads would not work.

However, if there are multiple devices, then each shader will be compiled
multiple times - so in the end, shader->osl_surface_ref etc. will be set
to the last device's value. Then, we end up pushing that value into every
device's vectors, which breaks for the earler devices.

The fix is simple - just preallocate the vectors and pass the correct index
into the compilation function. This way, each thread can safely store its
result and we can get rid of shader->osl_surface_ref entirely.

Note that while multiple shaders are compiled in parallel, the loop over
devices for a given shader is serial, so there's no concern of conflicts
over other shader internals.

Pull Request: https://projects.blender.org/blender/blender/pulls/146617
2025-09-29 03:12:18 +02:00
Amogh Shivaram
2bd06093c7 Cycles: Thin film iridescence for metals
Applies thin film iridescence to metals in Metallic BSDF and Principled BSDF.

To get the complex IOR values for each spectral band from F82 Tint colors,
the code uses the parametrization from "Artist Friendly Metallic Fresnel",
where the g parameter is set to F82. This IOR is used to find the phase shift,
but reflectance is still calculated with the F82 Tint formula after adjusting
F0 for the film's IOR.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: RobertMoerland <rmoerlandrj@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141131
2025-09-29 02:58:20 +02:00
Damien Picard
6c6d1a9b63 Cycles: OSL Camera: Improve Property UI
This expands Cycles' support for handling OSL property metadata for
Custom camera parameters and translating it to Blender's UI.

Specifically, it adds support for:
- Translation inputs (`string vecsemantics = "POINT"`)
- Normal inputs (`string vecsemantics = "NORMAL"`)
- File inputs (`string widget = "filename"`)
- Angle inputs (`string unit = "radians"`)
- Distance inputs (`string unit = "m"`)
- Time inputs (`string unit = "s"` or `string unit = "sec"`)
- Enum inputs (`string widget = "mapper", string options = "left:0|right:1"`)

It also sets the default value correctly, and corrects a warning string to
also mention cameras in addition to nodes as possible users of OSL shaders.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146736
2025-09-29 02:20:23 +02:00
Nikita Sirgienko
d36eea7fa7 Fix #129596: Always use multithreaded BVH building in Cycles again
The workaround of forcing BVH building into single thread
execution on the Blender side is not needed anymore,
because the problem was properly fixed in the upstream
since Embree upgrade in Blender 4.5

This reverts commit c0f0e2ca6f.

Pull Request: https://projects.blender.org/blender/blender/pulls/146859
2025-09-27 21:07:39 +02:00
Nick Alberelli
f7e7a5d09e Logging: Add argument to list all available categories
New `--log-list-categories` command line argument to list all available
logging categories. This improves documentation of logging, allowing
users to understand what logging categories are available for use. It is
also useful for developers to understand what logging categories already
exist before making a change.

Implemented using static initializers to register all logrefs on startup.

Ref  #141754

Pull Request: https://projects.blender.org/blender/blender/pulls/146456
2025-09-26 17:33:26 +02:00
marcopavanello
8e9ccb33d0 Fix #146632: Multiple Scattering Sky has dark pixels near the horizon
Avoid sqrt of a negative number.

Pull Request: https://projects.blender.org/blender/blender/pulls/146718
2025-09-26 17:29:00 +02:00
Weizhen Huang
2b0a1cae06 Cycles: Add an option to use ray marching for volume rendering
Null Scattering currently has performance and noise issues, and it will
take time to address them. For now add the previous Ray Marching back as
an option.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146317
2025-09-26 12:14:45 +02:00
Jeroen Bakker
44194579a5 Cleanup: Silence compilation warning
This change silences a compilation warning on non windows/x64 systems.
2025-09-26 10:03:39 +02:00
Jeroen Bakker
be4a34d103 Refactor: Vulkan: Move memory allocator ownership to GHOST.
This PR moves the ownership of vulkan memory allocator from gpu/device
to GHOST/context/device. This will allow in the future a cleaner control
flow between OpenXR and Vulkan. Currently as the ownership is in the gpu
module many objects would need to pass from GHOST to the GPU module to be
shared between the 2 allocators. Moving both (OpenXR/Context) allocator
to GHOST would reduce the complexity.

Pull Request: https://projects.blender.org/blender/blender/pulls/146819
2025-09-26 09:34:48 +02:00
Brecht Van Lommel
78ae7ec392 Render: Rename render passes for clarity
In very old OpenEXR version there was a limit on the channel names, which meant
the pass names needed to be short like "DiffDir". Change them to be longer like
"Diffuse Direct".

* This breaks forward compatibility. Old Blender version will lose links when
  reading compositing node setups with such passes, but #146571 will fix it
  for 4.5 LTS.
* Add-ons, scripts and compositing setups in other applications that rely on these
  names will also break.
* The find_by_type function for render passes has also been removed, as this was
  already deprecated and replaced by find_by_name.
* We assume spaces in the name are ok, since we have passes with them already
  and have not seen reports about compatibility issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/142731
2025-09-25 18:04:14 +02:00
Brecht Van Lommel
57342a51f8 Fix: Cycles: Ubsan warnings with new voronoi texture hashing
Signed integer overflow is undefined, but works reliably enough for us
anyway, so just silence it like the Blender implementation already does.

This also caused some tests like cycles_displacement_cpu to run much slower
(3s -> 42s) due to the overhead of detecting and ignoring repeated warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/146783
2025-09-25 17:48:22 +02:00
Brecht Van Lommel
689f182792 Cycles: Make adaptive subdivision a non-experimental feature
* Add adaptive subdivision properties natively on the subdivision surface
  modifier, so that other engines may reuse them in the future. This also
  resolve issues where they would not get copied properly.
* Remove "Feature Set" option in the render properties, this was the last
  experimental one.
* Add space choice between "Pixel" and "Object". The latter is new and can
  be used for object space dicing that works with instances. Instead of
  a pixel size an object space edge length is specified.
* Add object space subdivision test.

Ref #53901

Pull Request: https://projects.blender.org/blender/blender/pulls/146723
2025-09-25 16:18:50 +02:00
Jeroen Bakker
1a0a35ac93 Fix #146559: Vulkan: Wide lines not working in custom PyGPU shaders
For wide line rendering it is preferred to use polyline shaders. However
creating a custom shader is complicated and a stone to far for many
scriptors.

This PR allows using line_width_set when wide line rendering is
supported by the platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/146762
2025-09-25 14:02:11 +02:00
Clément Foucault
fe213f80a4 GPU: Shader: Make info files generated
This is the first step of moving the create infos
back inside shader sources.

All info files are now treated as source files.
However, they are not considered in the include tree
yet. This will come in another following PR.

Each shader source file now generate a `.info` file
containing only the create info declarations.

This renames all info files so that they do not
conflict with their previous versions that were
copied (non-generated).

Pull Request: https://projects.blender.org/blender/blender/pulls/146676
2025-09-25 10:57:02 +02:00
Campbell Barton
30485e6122 Cleanup: grammar, confusing wording 2025-09-24 03:06:11 +00:00
Guillermo Venegas
cd2cfdeab0 Allocator: Properly free polymorphic objects
Currently `MEM_delete` frees pointers expecting that they match to the
pointers allocated with `MEM_new`, otherwise it can cause undefined
behavior when freeing memory(using `--debug-memory` flag breaks in
place, if not it can corrupts other data, generating a incorrect back-traces).
However polymorphic objects lifetime can be managed by pointer of their
most derived type or by any pointer in their ancestor tree that defines
a virtual destructor, which sometimes can differ in offset when pointing to
the same object.

This changes ensures the correct pointer is being freed, by using the pointer
to the most derived type (returned by`dynamic_cast<void *>(...);`[0]).

----------

[0] = [dynamic_cast](https://en.cppreference.com/w/cpp/language/dynamic_cast.html):  `a) If expression is a pointer to (possibly cv-qualified) void, the result is a pointer to the most derived object pointed to by expression.`

-----------

As an example, given the followings structs:
```c++
struct A {
  int a;
  virtual ~A() = default;
};

struct B {
  int b;
  virtual ~B() = default;
};

struct Derived : public A , public B {
  int c;
};

std::unique_ptr<A> a_ptr = std::make_unique<Derived>();
std::unique_ptr<B> b_ptr = std::make_unique<Derived>();
```
Using std smart pointers  to manage `Derived` objects can be done with `A`
or `B` pointers.

However if a `Derived` object memory is managed with `MEM_delete`,
using a `B` pointer for freeing the memory currently may silently break Blender,
since it don't accounts for the full object memory layout, the `dynamic_cast<void *>(ptr);`
cast  gives a more safe pointer for freeing the memory.
Note that object destruction is successfully handled through the virtual destructor.

----------

This instead could be an assert to ensure polymorphic objects to be deleted
as the most derived object type.

Pull Request: https://projects.blender.org/blender/blender/pulls/146269
2025-09-23 16:50:43 +02:00
Michael Jones
a14fe128fc Fix: Cycles: MetalRT motion curves setup bug
MTLAccelerationStructureMotionCurveGeometryDescriptor.controlPointCount should specify the per-step control point count. Although the previous initialisation wasn't manifesting as incorrect behaviour it was technically wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/146568
2025-09-23 12:19:44 +02:00
Weizhen Huang
8d6b935466 Fix #144711: Cycles: rescale throughput when density is above the majorant
The one-sample Monte Carlo estimator of the radiative transfer equation
is
       <L> = T(t) / p(t) * (L_e + σ_s * L_s + σ_n * L),
Which means we can also use another p(t) than majorant * exp(-majorant * t)
for sampling the distance. Thus, we use the baked σ_max for distance
sampling, but adjust the majorant when we encounter a density that is
larger than σ_max.

Note that this is not really unbiased because such scaling is not always
applied, but seems to work well in practice when the majorant is
reasonable.

Pull Request: https://projects.blender.org/blender/blender/pulls/146589
2025-09-23 11:17:19 +02:00
Lukas Stockner
78147b5db7 Cycles: Add Render Time pass
This implements a basic render time pass,
using HW-based counters to minimize render time impact.

x86-64 uses the TSC instruction for timing, while ARM64 uses the cntvct_el0
register. In theory TSC is not always super reliable (e.g. old CPUs had it tied
to their current clock rate), but for somewhat recent CPU models it should
be fine. If neither is available, it falls back to `std::chrono::steady_clock`,
which should still be very fast.

The output is in milliseconds of CPU-time per pixel.

Pull Request: https://projects.blender.org/blender/blender/pulls/125933
2025-09-22 21:54:08 +02:00
Tenkai Raiko
f8d579d153 Nodes: Add Radial Tiling Node
On its own, the main functionality of the Radial Tiling node
is the ability to divide a 2D Cartesian coordinate system into
as many radial segments as specified by the "Segments" input.
Each segment has its own affinely transformed coordinate system,
provided through the "Segment Coordinates" output, which can be
used to tile textures in a radially symmetric manner.

Additionally, a unique index is provided for every segment through
the "Segment ID" output, the width of each segment at Y-coordinate
of the "Segment Coordinates" output without normalization = 0 is
provided through the "Segment Width" output and the rotation value
of the affine transformation of the coordinate system of each segment
is provided through the "Segment Rotation" output.

The roundness of the coordinate lines of the "Segment Coordinates"
output can be controlled through the "Roundness" inputs.
This can be used to make the coordinate systems of the segments
a mix of Cartesian and polar coordinates.

Lastly, the lines of points of the "Segment Coordinates" output with
constant Y-coordinates have the shape of polygon with rounded corners,
which can be used to procedurally create rounded polygons.

Pull Request: https://projects.blender.org/blender/blender/pulls/127711
2025-09-22 16:02:37 +02:00
Brecht Van Lommel
c2e5622d50 Revert "Shaders: Remove old Preetham and Hosek sky texture models"
These are causing quite a big difference in existing files, which is not
easy to address in versioning. Since the goal of removing this was to
simplify things for us and that's not the case, just revert this change.

This reverts commit ab21755aaf.

Ref #139923

Pull Request: https://projects.blender.org/blender/blender/pulls/146336
2025-09-20 16:52:23 +02:00
Brecht Van Lommel
613abf0383 Logging: Cycles: Change various warnings to errors
So that --debug-exit-on-error can be used to detect issues like missing
textures. Blender also reports such cases as errors now.

Pull Request: https://projects.blender.org/blender/blender/pulls/146507
2025-09-20 16:28:43 +02:00
Brecht Van Lommel
fc8bc41b84 Cleanup: Compiler warning in GPU kernel compilation
Silence false positive about function not returning.

Pull Request: https://projects.blender.org/blender/blender/pulls/146178
2025-09-20 13:14:35 +02:00
Campbell Barton
4a6268e092 Cleanup: various non functional changes for C++ 2025-09-20 16:28:02 +10:00