Commit Graph

125675 Commits

Author SHA1 Message Date
Jeroen Bakker
c6c69c0656 Eevee-next: Octahedral mapping
Use octahedral mapping to store probe textures. Octahedral textures are easier to sample
and will increase performance. When extracting the world probe it will first be rendered into
a cubemap. This cubemap will then be remapped using octahedral texture coordinates.

* `CaptureView` captures the world light into a cubemap.
* `CaptureView` triggers the reflection probe module to update the octahedral texture using
   the cubemap.
* When sampling reflection probes it will convert the (cubemap) direction to octahedral
   coordinate and read from the octahedral texture.

![image](/attachments/d3331660-f893-41b7-8c17-ae12ddf2ad11)

Pull Request: https://projects.blender.org/blender/blender/pulls/109559
2023-07-03 15:14:34 +02:00
Sergey Sharybin
4e165c9d6f Update Eigen to version 3.4.0
Reportedly, it helps moving the Windows Arm libraries forward.

Pull Request: https://projects.blender.org/blender/blender/pulls/109378
2023-07-03 15:09:20 +02:00
Germano Cavalcante
9d1f66c492 Fix 'optimize' directive usage on MSVC
"O" isn't an option.
2023-07-03 09:48:56 -03:00
Jeroen Bakker
c2c1d6f67b Metal: EEVEE Next shadow unit test enablement
Ensure correct SSBO bindings are present for shadow tests.
Metal validation errors occur if SSBO bindings that are expected are
not bound. In this case, we can bind empty SSBOs, but these should
be of the correct type for the tests.

Also adding missing zero-initializations for required members within
LightData. Without these, unit tests fail with various issues including
prevalence of OOB reads.

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/109645
2023-07-03 14:24:34 +02:00
Sergey Sharybin
03fd794130 Fix #109550: Cycles: OptiX not able to render without CUDA toolkit
Happens with specific GPUs like  NVIDIA A100-SXM4-40GB. They use the
compute capability 8.0, which is not explicitly compiled as a cubin,
and since 7fca0ee76a the PTX is not suitable for it either.

The safest solution is to revert the change to a known good state,
and re-iterate as needed.

Revert "Cycles: Increase the compute model for the PTX kernel"

This reverts commit 7fca0ee76a.

This change would need to be cherry-picked to the 3.6 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/109636
2023-07-03 13:55:36 +02:00
Nikita Sirgienko
7977247995 Cycles: Avoid printing capabilities when there are no devices
Pull Request: https://projects.blender.org/blender/blender/pulls/109511
2023-07-03 13:09:41 +02:00
Julian Eisel
248b322896 UI: Improve how region size snapping respects the maximum size
Previously, a region that used size snapping could be dragged to a
snapped size (say 3 times a column width), but then would be clamped to
an unsnapped size (say 2.7 times a column width) to make it fit the
available space.
Instead clamp the size before snapping, so that snapping respects the
available width/height (resulting in 2 times a column width for
example). Put differently, the region will not be made taller if there's
not enough space to fit the region up to the next snapping point.

Implemented as part of #104831.

Pull Request: https://projects.blender.org/blender/blender/pulls/109027
2023-07-03 13:06:38 +02:00
Utsav Singh
bbcdf88f82 Fix #108960: Replace archived link from custom nodes template
Replace archived link with working blender api docs link related
to the same content (properties and custom-properties)

Pull Request: https://projects.blender.org/blender/blender/pulls/109103
2023-07-03 12:21:06 +02:00
Jacques Lucke
d5cd0a1ea6 Cleanup: quiet warning due to unused function 2023-07-03 12:17:26 +02:00
Damien Picard
11ecfaa6b0 I18n: use proper name for the Convert Colorspace node
The Convert Colorspace node uses "Convert Colorspace" as a name on
registration, but it uses "Color Space" as a `DefNode()` in
NOD_static_types.h.

As a result, the node name is not extracted to the .po files, and thus
not translated.

This commit uses the same name in all definitions of the node.

Pull Request: https://projects.blender.org/blender/blender/pulls/109419
2023-07-03 12:16:43 +02:00
Bastien Montagne
fb8c9a2a42 Fix toggling of liboverrides between editable and non-edtiable with "Make" tool in the Outliner.
regression from 43a31d3c93.

Found while investigating #109513.
2023-07-03 12:07:08 +02:00
Clément Foucault
8fa8f1ca78 Cleanup: DRW: Remove uneeded point cloud vertex inputs 2023-07-03 11:51:53 +02:00
Bastien Montagne
0aafc49c91 Fix (unreported) missing viewlayer sync call in Outliner liboverride tool. 2023-07-03 11:46:38 +02:00
Campbell Barton
e06a341546 License headers: add SPDX-FileCopyrightText 2023-07-03 19:20:39 +10:00
Bastien Montagne
ad4aa692ce Fix #109590: Outliner: Assert in outliner_collect_objects_to_delete. 2023-07-03 11:19:44 +02:00
Miguel Pozo
903f9ad178 Workbench Next: Point Clouds
Point Cloud support for the new Draw Manager and Workbench Next.

Pull Request: https://projects.blender.org/blender/blender/pulls/109568
2023-07-03 11:16:44 +02:00
Clément Foucault
c2d693f431 GPU: Print shader dependency errors to error stream
This avoid loosing these messages during the build process
which is the point of WITH_GPU_BUILDTIME_SHADER_BUILDER.
2023-07-03 10:36:20 +02:00
Philipp Oeser
5308abafd8 Fix #109455: NLA editor tracks widgets backdrop is too small
Caused by d9f5ce2546 which moved the NLA solo button to the right, but
didnt make the backdrop behind the right-hand-side widgets bigger. So
the first widget seemed "transparent" over the channel name.

Now make the backdrop bigger if the solo button is drawn.

Pull Request: https://projects.blender.org/blender/blender/pulls/109498
2023-07-03 09:15:12 +02:00
Campbell Barton
1a758aa793 BLI_dynstr: remove workaround for vsnprintf on WIN32
Based on code-comments it seems vsnprintf didn't return the un-clamped
string length on MS-Windows, this is no longer the case.
BLI_dynstr used allocation doubling in a loop (with a 65536 limit)
in an attempt to allocate sufficient space.

This workaround isn't needed anymore. Expose BLI_sprintfN_with_buffer &
BLI_vsprintfN_with_buffer functions that take a fixed buffer to avoid
allocation for smaller strings.
This simplifies BLI_dynstr_appendf considerably.
2023-07-03 17:01:32 +10:00
Campbell Barton
6fbe467021 Cleanup: replace BLI_dynstr with a call to BLI_vsprintfN 2023-07-03 14:15:07 +10:00
Campbell Barton
c63fd11095 Cleanup: simplify BKE_report_prependf
Format the prefix once, then prepend it using a function shared between
BKE_report_prependf & BKE_report_prepend.
Replace BLI_dynstr with BLI_vsprintfN for string formatting.
2023-07-03 14:15:02 +10:00
Campbell Barton
33a7b80a6f BLI_string: use vsnprintf for BLI_sprintfN & BLI_vsprintfN
Avoid having to create & free the DynStr, which created an additional
temporary buffer. Gives around 1.5x overall speedup.
2023-07-03 13:57:25 +10:00
Campbell Barton
10bbf29d49 BLI_string: add BLI_vsprintfN
Avoid having to use BLI_dynstr to format a string using a va_list.
2023-07-03 13:14:06 +10:00
Campbell Barton
22b98a1a55 Fix error creating a random seed from the time
On my system `int(PIL_check_seconds_timer() * 1000000.0)` always game
the same result because the double value was out of the int range.

Use PIL_check_seconds_timer_i instead (as is done elsewhere).
2023-07-03 13:06:00 +10:00
Campbell Barton
ea3e221cc7 Cleanup: avoid ambiguous conversion from short -1 to bool 2023-07-03 12:36:30 +10:00
Hans Goudey
301f13191b Geometry Nodes: Use implicit sharing for mesh to curve node simple case
When the vertex indices are already ordered like curve points, the
attribute arrays can be shared with the result mesh. This reduces
memory and saves time copying the data. The improvement is
larger when the mesh contains more point domain attributes.
2023-07-02 22:12:32 -04:00
Hans Goudey
b2017978d4 Cleanup: Mesh to Curve: Decrease variable scope, improve comments 2023-07-02 21:37:26 -04:00
Hans Goudey
7be0d1481c Cleanup: Simplify topology node deduplication comparisons
And add deduplication to the corners of edge count field input.
2023-07-02 18:31:20 -04:00
Germano Cavalcante
dd4f0cebae Fix #109577: Wireframe edge factor is sometimes random
In some situations the loop value might not be set.
2023-07-02 19:25:08 -03:00
Germano Cavalcante
43015f5763 Mesh Merge By Distance: Avoiding unnecessary copying of 'vert_dest_map'
The `vert_dest_map` array, which contains a map indicating the index of
destination vertices, was being copied to another array (`WeldVert`)
unnecessarily.

By directly using the `vert_dest_map` array, we achieved a performance
improvement.

The average execution time of different operations was reduced from
267.4ms to 261.3ms, resulting in a 2.3% improvement in overall
performance.
2023-07-02 18:19:10 -03:00
Germano Cavalcante
2b0c1c6b75 Mesh Merge by Distance: Add 'SCOPED_TIMER' utility 2023-07-02 17:36:53 -03:00
Germano Cavalcante
087fd3bdc5 Fix compilation error with USE_WELD_DEBUG
Missed in 7966cd16d6
2023-07-02 16:53:44 -03:00
Hans Goudey
4369429101 Cleanup: Move NOD_socket.h to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/109623
2023-07-02 21:01:57 +02:00
Hans Goudey
4f90504def Fix: Node group operator crash with group node
`modifier_data` is null when geometry nodes executes as an operator.
2023-07-02 11:40:31 -04:00
Iliya Katueshenock
6777c0c98e Fix: Assert creating offsets in duplicate elements node
Fix of assert for debug build. Offsets have one last extra
element, used to contain offset for last real element. When
copying values to offsets, the last element has to be ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/109476
2023-07-02 17:22:51 +02:00
Hans Goudey
15cecd1833 Fix: Assert in sculpt mask extract object creation
`BKE_mesh_nomain_to_mesh` already copies the "parameters" to the
result mesh, and the result mesh here wasn't an "evaluated" mesh like
the removed function expected.
2023-07-02 10:32:07 -04:00
Hans Goudey
9e78d4e646 Cleanup: Remove unnecessary modal callback for face set extract
Fairly recently `OPTYPE_DEPENDS_ON_CURSOR` was added, which makes
the modal callback used to allow clicking on a face set unnecessary.
There is no more instructional text in the status bar, but the changed
mouse cursor should make that clear anyway. Removing the modal
callback makes the behavior more standard, and avoids hardcoding
the operator's keymap.

Pull Request: https://projects.blender.org/blender/blender/pulls/109608
2023-07-02 16:22:11 +02:00
Hans Goudey
5ccb458a21 Cleanup: Sculpt: Remove unnecessary absolute values of face sets
Since ee23f0f3fb, face sets no longer store the hidden
status of faces. Code used to use the absolute value of face set values
to avoid including the hidden status. That's no longer necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/109612
2023-07-02 16:21:31 +02:00
Campbell Barton
4f3e2ee857 Refactor: split the animation players image buffer display context
Image buffer display in the animation player was difficult to reason
about because it could potentially access the entire play-state on load
(frame-step, modifier keys... etc) even though these are are only
intended to be used interactively.

Add playanim_toscreen_ex which is called by both
playanim_toscreen & playanim_toscreen_on_load which doesn't use the
PlayState struct.
2023-07-02 19:54:27 +10:00
Campbell Barton
4be274a703 Cleanup: pass a const ibuf to ED_draw_imbuf_method 2023-07-02 19:54:27 +10:00
Campbell Barton
1c104b16dd Cleanup: use set.discard instead of a __contains__ check before remove() 2023-07-02 19:54:27 +10:00
Campbell Barton
f7d6b7973a Cleanup: minor C++ changes (use nullptr, correct parameter names) 2023-07-02 19:54:27 +10:00
Campbell Barton
69aee8ba6b Cleanup: remove redundant (void) for functions with no args in C++ 2023-07-02 19:54:27 +10:00
Campbell Barton
feb83e66c6 code_clean: add use_empty_void_arg cleanup operation
Removes the use of (void) in C++ for functions with no arguments
2023-07-02 19:54:27 +10:00
Campbell Barton
345d1a4b44 Cleanup: simplify struct declarations in C++
Replace `typedef struct X {} X;` with `struct X {};`

In some cases the first and last name didn't match although this
is rarely useful, even a typo in some cases, e.g. TrachPathPoint.
2023-07-02 19:54:26 +10:00
Campbell Barton
ffab21a3ef Cleanup: format 2023-07-02 19:54:26 +10:00
Campbell Barton
1cdaae9611 Cleanup: quiet GCC warnings 2023-07-02 19:54:26 +10:00
Jacques Lucke
db7b2ef386 Cleanup: remove unnecessary "struct" in declaration 2023-07-02 11:37:56 +02:00
Jacques Lucke
4658de2255 DNA: move makesdna to C++
Also see #103343.

The main complication here was that the `long` type was poisoned in GCC, but it's used by
some included C++ headers. I removed the compile-dependent poison and added a new
check for `long` and `ulong` so that they still can't be used in DNA.

Pull Request: https://projects.blender.org/blender/blender/pulls/109617
2023-07-02 10:43:51 +02:00
Jacques Lucke
373e7aa995 Cleanup: remove pragma once from .cc file 2023-07-02 08:40:30 +02:00