Commit Graph

132917 Commits

Author SHA1 Message Date
Hans Goudey
ed0be291c8 Cleanup: Use float4x4 matrix type in volume displace modifier 2024-02-14 10:51:46 -05:00
Clément Foucault
0c279526eb EEVEE-Next: Render Tests: Bake world in volume probes
Improves quality. Doesn't impact performance
2024-02-14 16:24:02 +01:00
Clément Foucault
f20425bc4c Fix: EEVEE-Next: Missing Volume Probe update after world update 2024-02-14 16:24:02 +01:00
Hans Goudey
1c0f374ec3 Object: Move transform matrices to runtime struct
The `object_to_world` and `world_to_object` matrices are set during
depsgraph evaluation, calculated from the object's animated location,
rotation, scale, parenting, and constraints. It's confusing and
unnecessary to store them with the original data in DNA.

This commit moves them to `ObjectRuntime` and moves the matrices to
use the C++ `float4x4` type, giving the potential for simplified code
using the C++ abstractions. The matrices are accessible with functions
on `Object` directly since they are used so commonly. Though for write
access, directly using the runtime struct is necessary.

The inverse `world_to_object` matrix is often calculated before it's
used, even though it's calculated as part of depsgraph evaluation.
Long term we might not want to store this in `ObjectRuntime` at all,
and just calculate it on demand. Or at least we should remove the
redundant calculations. That should be done separately though.

Pull Request: https://projects.blender.org/blender/blender/pulls/118210
2024-02-14 16:14:49 +01:00
Clément Foucault
bdd15e827f Fix: EEVEE-Next: Crash in bake caused by motion blur
Motion blur needs to be disabled for volume probe baking.
2024-02-14 15:55:36 +01:00
Clément Foucault
b647bed2d5 EEVEE-Next: Render Tests: Cosmetic changes 2024-02-14 15:55:36 +01:00
Clément Foucault
90dc66885f Fix: EEVEE-Next: Render Tests: Change probe visibility before bake 2024-02-14 15:55:36 +01:00
Omar Emara
357d6fcae1 Cleanup: Format 2024-02-14 16:50:20 +02:00
Brecht Van Lommel
aefd930317 Fix: Build error when not using unity build 2024-02-14 15:13:12 +01:00
Clément Foucault
2d08e16601 Cleanup: EEVEE-Next: Split display sync function 2024-02-14 15:09:31 +01:00
Clément Foucault
ee6c7d8eea Fix: EEVEE-Next: Sphere Probe: Wrong world probe index 2024-02-14 15:09:31 +01:00
Jacques Lucke
d27a1c47fa Nodes: hide uneditable input sockets in sidebar
This hides some labels from the sidebar which look a bit out of place.

Pull Request: https://projects.blender.org/blender/blender/pulls/118264
2024-02-14 14:47:07 +01:00
Omar Emara
da238bdb2f Fix: Realtime Compositor tests use CPU compositor
The Realtime Compositor uses the CPU compositor. That's because the enum
identifier of the Realtime Compositor changed to GPU, so update the test
script accordingly.
2024-02-14 15:35:35 +02:00
Sergey Sharybin
a8a05ebba1 Compositor: Switch CPU compositor to Full-Frame
The tiled compositor code is mainly still around, which is only
expected to be a short-lived period. Eventually it will also be
removed.

The OpenCL, Group Buffers, and Chunk size options are already removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/118010
2024-02-14 14:23:49 +01:00
Clément Foucault
7cc4339ce2 EEVEE-Next: Improve tests appearance
This improves the volume probe resolution and
dimensions to envelope most test scenes.
This doesn't increase the baking time
that much as most of the baking time is
spent compiling shaders.
2024-02-14 13:02:01 +01:00
Clément Foucault
1f8fac5082 Fix: EEVEE-Next: Broken light baking from script
The G.is_break was not properly set back to false
and the data was never copied back to the original
object.
2024-02-14 13:02:01 +01:00
Sergey Sharybin
2cec7e3aa5 Fix levels node regression in tiled compositor
Caused by previous change for full-frame compositor.

The determine_canvas() is still used by the tiled compositor,
so restore it to the state which makes both compositors to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118254
2024-02-14 12:02:59 +01:00
Pratik Borhade
dda277e48c Merge branch 'blender-v4.1-release' 2024-02-14 16:22:28 +05:30
Pratik Borhade
f344823785 UI: Opus files not included in sound files filter
Include `.opus` extension in audio filter list

Fixes #118235

Pull Request: https://projects.blender.org/blender/blender/pulls/118238
2024-02-14 11:39:11 +01:00
Pratik Borhade
18912561b5 Fix #118163: Crash hiding face sets with multires
Caused by ce4ec6d42b
Crash occurs due to accessing `corner_tri_faces` when pbvh tpye is
"grid".
Fix is same as 72d324bd81

Pull Request: https://projects.blender.org/blender/blender/pulls/118183
2024-02-14 11:37:11 +01:00
Sergey Sharybin
a1047e0689 Compositor: Make CPU Level node output single value
This aligns the node behavior to GPU compositor.

The implementation is a bit of a stretch of the full-frame
constant-foldable operations, but this is as good as it can
get in a short time.

The alternative could be to somehow inject a SetValue
operation, but since it expects ahead-of-time known value it
is not as straight forward.

Pull Request: https://projects.blender.org/blender/blender/pulls/118248
2024-02-14 10:54:59 +01:00
Campbell Barton
8a4c45a202 Merge branch 'blender-v4.1-release' 2024-02-14 15:33:09 +11:00
Campbell Barton
0b9ec567c8 Cleanup: format 2024-02-14 15:31:31 +11:00
Campbell Barton
156fffbfde Merge branch 'blender-v4.1-release' 2024-02-14 14:29:55 +11:00
Campbell Barton
5a86067ff0 Fix build error from duplicate include 2024-02-14 14:27:58 +11:00
Campbell Barton
291ca4ec8e Cleanup: unused variable, redundant strlen call 2024-02-14 13:59:37 +11:00
Campbell Barton
aa6ab9caf9 Cleanup: various non-functional changes for C++ 2024-02-14 13:56:58 +11:00
Campbell Barton
cdc17751ae Cleanup: format 2024-02-14 13:53:36 +11:00
Campbell Barton
1111dff0a6 Tests: improvements to BLI_convexhull_2d_test
The convex hull tests included a reference AABB-fitting function for
comparison which was used to validate the optimized implementation.
This wasn't great as it depended on matching exact return values and
didn't test the logic of AABB-fitting worked usefully.

Replace this with a more general test that creates random polygons with
known bounds, apply a random rotation & translation, then use
AABB-fitting to un-rotate the points, passing when the bounds are no
larger than the size of the generated input.

Details:

- Make BLI_convexhull_aabb_fit_hull_2d a static function again as it was
  only exposed for tests. Use BLI_convexhull_aabb_fit_points_2d instead.
- Remove brute force reference implementation from tests,
  moving this to an assertion within convexhull_2d
  (disabled by default since it's quite slow).
2024-02-14 13:42:14 +11:00
Campbell Barton
d7dfbce288 code_clean: exclude BLI_strict_flags.h from removal
As this is only added to set strict warnings, cleaning logic would
remove as the compilers output is unchanged.

Support excluding headers from removal, others can be added if needed.
2024-02-14 13:40:33 +11:00
Campbell Barton
3f8cd44485 Cleanup: move BLI_strict_flags.h last, not that it should be kept last
Also add a note in the header why it should be kept last.
2024-02-14 13:40:31 +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
Germano Cavalcante
e6e4e6c287 Optimization: avoid calculating the contraint plane when transforming
In most cases, we only need the normal of the plane.

It's a micro-optimization, the difference is very subtle.
2024-02-13 21:21:48 -03:00
Germano Cavalcante
1a74b80d42 Refactor: replace 'isect_ray_plane_v3' with 'isect_ray_plane_v3_factor'
By using `isect_ray_plane_v3_factor` we avoid calculating the v4 plane.
2024-02-13 21:08:49 -03:00
Germano Cavalcante
c9bd326255 Merge branch 'blender-v4.1-release' 2024-02-13 20:35:52 -03:00
Germano Cavalcante
c6e229d3e4 Fix #118221: Snap to Edge with Constraint Plane shifts out of plane
The intersection needs to be calculated with the plane passing through
the snap pivot.
2024-02-13 20:35:08 -03:00
Hans Goudey
5ba6f6d833 Cleanup: Replace typedef keyword in C++ headers 2024-02-13 15:34:32 -05:00
Hans Goudey
7b77c2ebd4 Cleanup: Remove unused 3D view function declaration 2024-02-13 15:00:01 -05:00
Miguel Pozo
2a2effc0c2 Workbench: Share shader cache across instances
Improve instance creation performance by sharing compiled shaders
across instances. (See #114990)

Pull Request: https://projects.blender.org/blender/blender/pulls/118062
2024-02-13 20:56:54 +01:00
Harley Acheson
8fee7c5fc7 UI: Line Under Title for Properties Dialogs
When a popup dialog includes properties, add a line under the title.

Pull Request: https://projects.blender.org/blender/blender/pulls/118051
2024-02-13 20:37:45 +01:00
Clément Foucault
3f5310cc59 EEVEE-Next: Use hair strip in render tests
This makes many render tests match cycles reference
much better.
2024-02-13 20:29:29 +01:00
Clément Foucault
db2f15f01f Fix: EEVEE-Next: Use raytracing again in render tests 2024-02-13 20:26:32 +01:00
Hans Goudey
9cf304160b BLI: Add missing overrides to some generic virtual array implementations
The lack of these functions in the "single trivial value" and "sliced
GVArray" implementations caused some code to call fack to the base
class functions. Those are much slower since they involve a virtual
function call per element. For example, this changed the runtime of
creating a new boolean attribute set to "true" on one million faces
from 3.4 ms to 0.35 ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/118161
2024-02-13 19:59:58 +01:00
Clément Foucault
83c3da2e55 EEVEE-Next: Improve render test script
- Avoid using `except: pass` so broken script don't go
undetected.
- Increase resolution of volumes
- Increase motion blur step resolution
- Fix setting on all scenes
2024-02-13 19:10:02 +01:00
Clément Foucault
88228a84d1 Fix: EEVEE-Next: Another uninitialized variable in volume probe loading
The spherical_harmonics_triple_product was not working as
expected and produced NaNs.

Cleanup to avoid more confusion.
2024-02-13 19:05:15 +01:00
Clément Foucault
13f0d7bd47 Fix: EEVEE-Next: Uninitialized variable in volume probe loading
The spherical_harmonics_triple_product was not working as
expected and produced NaNs.
2024-02-13 18:59:53 +01:00
Clément Foucault
65d42af3e3 Fix: EEVEE-Next: Broken light capture on emission only materials
This was cause by uninitialized fragment output.
2024-02-13 18:59:53 +01:00
Clément Foucault
6802d87329 EEVEE-Next: Remove DeferredProbeLayer intermediate class
This class is redundant as it is never instanced more
than once.
2024-02-13 18:59:53 +01:00
Clément Foucault
ba6e6e96ed EEVEE-Next: Move ray type change out of view loop
Avoid needlessly pushing the uniform_data to the GPU.
2024-02-13 18:59:53 +01:00
Clément Foucault
0bab7b59a1 EEVEE-Next: Use same GBuffer binding logic for every pipeline 2024-02-13 18:59:53 +01:00