Adds an attenuation factor inside the LTC evaluation, reducing light
leakage in our approximation. Further refactors surrounding code to
avoid recomputing light data that is in the caller.
Pull Request: https://projects.blender.org/blender/blender/pulls/161262
While testing driver stack changes while moving our AMD GPU workers
from Rocky Linux 8 to Ubuntu 24.04 these tests came up as errors. Some
of these errors could be attributed to hardware differences (W7600 vs.
W7800).
Pull Request: https://projects.blender.org/blender/blender/pulls/163975
Based on the "Stochastic ray tracing of transparent 3D Gaussians" paper
by Xin Sun et. al. The basic idea: perform stochastic intersection with
the Gaussian splat based on its transparency.
Gaussian splats are implemented as a dedicated primitive type, but it
shares the same layout for position and radius as points, so a lot of
existing functions (positions, attributes, etc) work for both points
and splats.
For the Embree and hardware intersection it is implemented as a custom
primitive type.
The choice of using bounding spheres mainly comes from a balance between
performance and memory usage. More ideal would be to use OBB, but it is
not supported for custom primitive types in Embree and GPU HW-RT on all
backends.
There is a known limitation that comes from the fact that the datasets
are trained in sRGB space and Cycles work in Linear space: areas with
low opacity and high radiance render noticeably differently from the
ground-truth implementation.
Ref #159470
Pull Request: https://projects.blender.org/blender/blender/pulls/163103
Why:
Feature parity. Cycles has sun disk. EEVEE's atmospheric contribution
was incomplete without one.
How:
Should be pretty self explanatory. Grab the values from the Node.
Compute the values. Sum into the sky RGB. Designed to mimic the
convention Cycles uses. With the exception of the angular distance,
instead using the GLSL helper. Also removed the GUI warning as it was no
longer necessary.
For obvious reasons. The sun would not survive baking into the LUT. So
its summed to the final RGB.
Pull Request: https://projects.blender.org/blender/blender/pulls/163132
# Implemented
- Panoramic camera types: equirectangular,
equiangular cubemap face, fisheye equidistant,
fisheye equisolid, fisheye lens polynomial,
central cylindrical, mirror ball.
- Render 6 subviews (fixed 90° FOV each, 5% overscan).
- Subview enable/disable masking (PanoramicViewBits)
to skip faces not needed for narrow FOV.
- Accumulate radial depth for panoramic projections.
- Film accumulation per owning face per pixel.
# Future tasks
### Turned off for now
- Depth of Field
- Volume temporal reprojection history state is shared
across all 6 subviews instead of per-view, so it's disabled
for now. Per-view history would be the real fix.
### Optimizations
- Per-face render resolution: scale each cubeface's resolution
to its actual angle contribution instead of a fixed size.
- Clip each subview's projection matrix to its actual visible FOV
instead of always rendering the full 90°. Needs care to clip to
exact pixel borders, or reprojection onto the film breaks.
- Stencil mask per subview to avoid computing weights.
(currently: pixels not owned by a face just copy their existing
value and return early).
### Known limitations
- Film sampling use nearest-texel only, not a proper filter kernel
(a 3x3 or plus-shaped 5-sample kernel would reduce
aliasing/banding)
- No antialiasing at boundaries.
- Screen-space raytracing hits subview boundaries and
creates artifacts. Possible fix: overscan parameter and make a
blend between the cubefaces.
Pull Request: https://projects.blender.org/blender/blender/pulls/159474
A new command line option `--debug-gpu-backend-no-fallback` is added
that skips the GPU backend support checks. This is primarily useful for
the GPU tests that should not fall back to another backend. This has the
useful side effect of skipping `vk_instance_create_for_platform_checks`,
which would otherwise create its own Vulkan instance. `vkCreateInstance`
can be an expensive function call depending on the used GPU driver (see
https://projects.blender.org/infrastructure/meta/issues/231).
Pull Request: https://projects.blender.org/blender/blender/pulls/163203
Dispersion is defined by two parameters:
Abbe Number and Dispersion Scale.
This corresponds to OpenPBR v1.1.1
Pull Request: https://projects.blender.org/blender/blender/pulls/162041
Note: dispersion is temporarily disabled when using MNEE (shadow caustics) on oneAPI, due to a compiler bug. Waiting for a fix from the oneAPI side.

Co-authored-by: Sebastian Herholz <sebastian.herholz@gmail.com>
The compute-shader based function `update_mipmaps` can generate broken
mipmaps for Intel Arc Windows OpenGL. A workaround for falling back to
`generate_mipmap` is added to mitigate the issue. Furthermore, a render
test is added that catches the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/162524
Previously, the blocklist for volume_instance was only applied to the
OpenGL backend for Intel Windows. While this issue was presumably fixed,
the same issue can also be seen sporadically for the Vulkan backend.
Until the issue has been investigated, it makes sense to blocklist both.
Pull Request: https://projects.blender.org/blender/blender/pulls/162411
Since the same pixel gets used every sample,
the rounding error accumulates and biases the
result instead of averaging out, as we're using
a fixed offset.
Fix by dithering the rounding offset per
sample instead of using a fixed value.
Pull Request: https://projects.blender.org/blender/blender/pulls/161958
As the vulkan backend is now default, `get_gpu_device_vendor()` returns
the selected GPU for Vulkan. In the rare case that OpenGL uses a
different GPU, this causes render tests to use incorrect tolerances and
possibly fail. The PR adds the GPU backend argument to
`get_gpu_device_vendor()` to avoid this\*.
> \* this = confusing me
Pull Request: https://projects.blender.org/blender/blender/pulls/161255
This particular combination was not computing the stack size correctly,
since shader raytrace was moved to a separate OptiX module. It needs to
be set manually now that it's not part of the same module.
Regression from c51fcf73a7.
Pull Request: https://projects.blender.org/blender/blender/pulls/160318
The heuristic for colorless reflections detection
was not taking into account the Multiscatter GGX case.
In this configuration, the `Favg` is tinting the reflectance
which results in colored reflections. The Gbuffer packing needs
to be notified to account for that.
See `GPU_MATFLAG_REFLECTION_MAYBE_COLORED`.
Also unblock Principled BSDF transmission test.
It was previously disabled because of a shadow
issue that was recently solved. Moreover it tests for this
specific case.
Pull Request: https://projects.blender.org/blender/blender/pulls/160232
Platform can get unstable. The artifacts that were detected seemed
like invalid synchronization of index buffers, or incorrect execution
of vertex buffers. This could be related to the combination of AMD
official drivers and Rocky8. More investigation is needed, but for
now we just disable these tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/160204
Initially noted by devops as a problem: UI tests when crashing
spawn our crash dialog, that will just sit there for 1200 seconds
until the CI environment decides the test has failed and kills the
process, clicking away the dialog also works, but neither option is
ideal here.
The crash handler knows when we are in background mode, (`-B`) and
suppresses this dialog so this is why it has not been an issue for the
normal tests. However when we do crash we get an unhelpful message
saying `Writing: blender.crash.txt` which is not collected by buildbot
so unless a developer can get a devops person to go retrieve this file
its contents will be left to ones imagination.
This PR adds a `--console-crash-handler` argument that does two things:
1 - Suppress the crash dialog even when we are not in background mode
2 - Rather than writing the crash data to blender.crash.txt write this
information to stderr so it shows up in the CI logs.
It also updates all invocations of blender I could find in our test
scripts to pass this new flag. The benchmark scripts have not been
updated as they regularly run against older blender versions that may
not support the new flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/159983
EEVEE screen space ray tracing uses a bias of `-2.4e-7f * 2.0f` to avoid
self-intersections. This bias is increased to `-2.4e-7f * 7.0f` in order
to work around self-intersections present on Intel GPUs on Windows.
Pull Request: https://projects.blender.org/blender/blender/pulls/159953
This caused a discrepancy between Metal and other platforms.
From the MSL specification:
```
atan2(y, x)
Implemented as
if x > 0, atan(y / x),
if x < 0 and y > 0, atan(y / x) + M_PI_F
if x < 0 and y < 0, atan(y / x) – M_PI_F
and if x = 0 or y = 0, the result is undefined
```
Also the GLSL specification:
```
The result is undefined if x=0.
```
Fixed by adding a small epsilon to `atan`.
Pull Request: https://projects.blender.org/blender/blender/pulls/159305
The test shows non-deterministic behavior.
The reason is unknown, the max pool size is not exceeded.
The test shows a slightly different result each time, as long as the
volume probe is rendered.
Storing the bake result in the blend file (using a `Volume_Probe_Baked`
object) doesn't fix it.
Given that Linux doesn't seem to fail, it may be a driver issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/159121
Implement a visibility toggle for Raycast queries.
Available in `Properties Panel > Object > Visibility > Raycast`.
Allows selecting which objects are visible to the Raycast node.
Pull Request: https://projects.blender.org/blender/blender/pulls/157799
After fixing a bunch of issues over the years,
the render tests failure threshold it too high and
let valid errors become undetected.
Divide the fail threshold by 10 in most cases
and by 2 in worst cases.
This reduces the threshold to a very low number since
most EEVEE renders have a low amount of noise.
Some tests are updated to reduce platform differences.
This unveiled quite a few issues that will be fixed
in main later on (see blocklist edits).
Test refinement:
- 🟩 NVidia Opengl (reference)
- 🟩 AMD Opengl
- 🟩 AMD Vulkan
- 🟩 Intel Opengl
- 🟩 Metal
Pull Request: https://projects.blender.org/blender/blender/pulls/158810
This adds back lightprobe plane support for Blended Material
and Shader to RGB evaluation.
This adds a parallax property on the Lightprobe Planes to tweak
the amount of (non-physical) distortion caused by normals.
Unlike legacy EEVEE (4.1) this implementation does not do any
raytracing even if raytracing is enabled in the render options.
Instead, it uses the same heuristic when raytracing was disabled
in 4.1. However, it now uses the new parallax amount from the
planar lightprobe property.
The heuristic fades out reflections if the normal differs from
the reflection direction or if roughness is not small.
To avoid big regression in compile time, the sampling of the
planar probe is done only once for all the BSDFs and using the
average normal.
Fix#135198
Pull Request: https://projects.blender.org/blender/blender/pulls/158483
In OpenGL mipmap creation is a driver responsibility. In Metal
and Vulkan this became an application responsibility. This results
in a mismatch between OpenGL and the other backends.
This PR will implement mipmap creation inside the GPU module. It
is for now only enabled for Vulkan. OpenGL and Metal will be added
in separately.
This PR introduces a compute shader that will generate the
mipmap chain. The compute shader is be based on
https://github.com/nvpro-samples/vk_compute_mipmaps/tree/main/nvpro_pyramid
general sharer. This shader can calculate 2 mipmap levels at a time.
This PR adds the first couple of texture formats and falls
back to the backend specific implementation for the rest. The
supported texture formats are:
- 2D texture/UNORM_8_8_8_8
- 2D arrayed texture/UNORM_8_8_8_8
- 2D texture/SFLOAT_16
- 2D arrayed texture/SFLOAT_16
- 2D texture/SFLOAT_16_16_16_16
- 2D arrayed texture/SFLOAT_16_16_16_16
Other texture formats will be added later on and OpenGL/Metal enablement
will be added later.
Pull Request: https://projects.blender.org/blender/blender/pulls/155463
The raycast node disables self intersection when the ray start is the
surface position.
However, this fails when evaluating bump.
This commit adds an extra offset to the ray start (tmin) when
evaluating bump.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/154222
#### This patch adds **Direct** and **Indirect Light intensity controls** to **EEVEE**.
The new controls allow artists to scale the contribution of **direct** and **indirect**
lighting paths independently, without modifying the underlying lighting algorithms,
sampling, or ray tracing settings.
Both controls default to `1.0`, resulting in **no visual change** for existing files.
### Design Rationale
This feature is intentionally narrow in scope and exists to address cases that cannot
be handled correctly or efficiently using render passes or the compositor.
A compositor-based solution is currently not viable because Direct and Indirect light
passes **do not yet exist**, and when they do, they will not support **blended materials**.
This would create discrepancies between **dithered** and **blended** materials.
Using render passes for this purpose would also require additional accumulation passes
and buffers, would not be compatible with `TAA`, and would be disproportionate to a simple
scalar operation. For these reasons, the controls are implemented directly in the EEVEE
lighting pipeline.
The scaling is applied after clamping to preserve firefly suppression behavior and to
match the **behavior** of a **post-lighting compositing** adjustment.
### Intended Use
In spirit, this is similar to *Light Probe intensity* and is useful for:
- Large-scale environments where lighting balance needs adjustment
- Scenes requiring stronger or weaker indirect illumination
- Balancing direct vs indirect contribution without reauthoring lights
- HDR and color grading workflows
The controls do **not** alter ray depth, sampling, accumulation, or performance
characteristics, and apply uniformly across the EEVEE lighting paths.
Pull Request: https://projects.blender.org/blender/blender/pulls/153340
This commit adds the environment variable
`BLENDER_TEST_IGNORE_VENDOR_BLOCKLIST` to the GTest and Python tests.
In contrast to `BLENDER_TEST_IGNORE_BLOCKLIST`, this only ignores the
blocklists for tests that are blocked for individual hardware vendors.
When a test fails in Blender due to driver issues, the test is blocked
for the hardware vendor until a fixed driver is available for the CI
workers. This means that hardware vendors need to manually remove the
blocklists when they check the state of test failures.
The new environment variable gives an easy option to also run these
tests in case where seeing these failures (but not general failures,
e.g., due to issues in Blender) is preferrable.
Pull Request: https://projects.blender.org/blender/blender/pulls/153549
This PR adds separate Vulkan backend tests for Storm Hydra/USD and UI.
The new tests are called:
- storm_hydra_[backend]_*
- storm_usd_[backend]_*
- ui_[backend]_*
The Vulkan tests are not yet enabled by default due to open issues.
For enabling them, the CMake options WITH_STORM_TESTS_VULKAN and
WITH_UI_TESTS_VULKAN can be turned on.
Pull Request: https://projects.blender.org/blender/blender/pulls/149142