Commit Graph

131013 Commits

Author SHA1 Message Date
Campbell Barton
7f64bf482e Cleanup: rename GHOST event processing arguments
Rename `evt` to `ghost_event` since it's too similar to `event`
(used for generated `wmEvent` structs).
2023-12-12 13:21:22 +11:00
Campbell Barton
6e3d1be637 Licenses: add MPL-2.0 (from recent inclusion of NanoVDB.h) 2023-12-12 13:08:16 +11:00
Campbell Barton
dc2d7a4707 License headers: conform copyright to SPDX 2023-12-12 13:03:26 +11:00
Campbell Barton
77204bed17 Cleanup: spelling in comments 2023-12-12 12:58:56 +11:00
Campbell Barton
d93a594708 Cleanup: compiler warnings 2023-12-12 12:53:03 +11:00
Hans Goudey
249c8b0e6b Cleanup: Improve mesh MLoopTri struct comment
Update code examples to current C++ style. Change formatting
slightly to use more columns. Rewrite secions to be more explicit
and precise. Avoid cryptic / uncommon code in examples. Finding
real edges in particular is never inlined, we just use the function
for it.
2023-12-11 17:33:20 -05:00
Jason Fielder
9313750f0a Metal: Add fallback path for texture atomics V2
This patch adds an alternative path for devices/OSs
which do not support native texture atomics in Metal.
Support is encapsulated within the backend, ensuring
any allocated texture with the USAGE_ATOMIC flag is
allocated with a backing buffer, upon which atomic
operations happen.

The shader generation is also changed for the atomic
case, which instructs the backend to insert additional
buffer bind-points for the buffer resource. As Metal
also only supports buffer-backed textures for
textureBuffers or 2D textures, TextureArrays and
3D textures are emulated within a 2D texture, with
sample locations being indirected.

All usage of atomic textures MUST now utilise the
correct atomic texture types in the high level shader
and GPUShaderCreateInfo declarations.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/115956
2023-12-11 23:00:20 +01:00
Clément Foucault
cf4558d576 Fix: EEVEE-Next: Opaque dielectric packing broken 2023-12-11 22:50:42 +01:00
Germano Cavalcante
3612e0ef04 Fix #116058: 'Align Rotation to Target' does not consider object orientation
Similar to #49494, but here we need to consider orientation instead of
position.
2023-12-11 18:36:12 -03:00
Germano Cavalcante
1bcf3933a8 Cleanup: Use C++ Vector in transform translate 2023-12-11 18:24:49 -03:00
Hans Goudey
c02784bd4f Cleanup: Make format 2023-12-11 15:47:11 -05:00
Hans Goudey
dcf9d74cba Cleanup: Remove unused curves keymap items 2023-12-11 15:47:11 -05:00
Hans Goudey
9af176bfe6 Curves: Add edit mode duplicate operator
Reuse the grease pencil implementation added in:
- fb275bc040
- 5799a26568819ce27e8c12df96b7ffba84cc00f9
2023-12-11 15:47:11 -05:00
Hans Goudey
7dc6a6bd9a GPv3: Specialize duplicate function for curve selection domain
The logic can be much simpler when curves are selected rather than points,
because then we just copy all of the points in each curve. Like some other
operators, implement both cases.
2023-12-11 15:47:11 -05:00
Hans Goudey
6dad7afe5e Cleanup: Doxygen section title case consistency 2023-12-11 15:47:11 -05:00
Hans Goudey
a416677d4e Cleanup: Remove unnecessary "using namespace" lines 2023-12-11 15:47:11 -05:00
Hans Goudey
99f6f13add GPv3: Avoid creating cyclic attribute when unnecessary in duplicate operator
None of the final curves will be cyclic if none of the original curves were cyclic.
2023-12-11 15:47:11 -05:00
Hans Goudey
d8497e48e1 Cleanup: Use is_empty() instead of size() == 0 2023-12-11 15:47:11 -05:00
Richard Antalik
4e10aa6e71 Fix #115086: Retimed hard split sound strip does not seek correctly
Content cut off by `anim_startofs` is as if it does not exist for
sequencer. But Audaspace seeking relies on having animation buffer
initialized for whole sequence. Initialize pitch of cut content to 1.
2023-12-11 21:18:49 +01:00
Clément Foucault
fe2a7f4b8d EEVEE-Next: Support ShaderToRGBA on Dithered materials
This adds a new hybrid mode where the light and lightprobe
textures are bound to the gbuffer pass and used by
shaders that use ShaderToRGBA.

The counterpart is that these shaders have less texture
slots available but still two more than the Blended
materials.

These materials will correctly write to the AOVs and
render passes.

This is not too invasive in terms of implementation. The
only quirk was that we needed another fragment shader to
simplify the dependencies on the resources. But if we ever
get pre-processor support in our include / require system
this could be cleaned up.
2023-12-11 20:32:58 +01:00
Clément Foucault
8ab23ea17d Fix: EEVEE-Next: Missing indirect light in ShaderToRGBA
Silly mistake. The lighting was not added to the right
variable.
2023-12-11 20:32:58 +01:00
Miguel Pozo
73a5826bf5 Fix: EEVEE-Next: Film matrix
Fixes motion vectors for static geometry.
Regression from beee7db.
2023-12-11 20:23:04 +01:00
laurynas
feae0b4173 Curves: Support for edit mode draw tool
Adds new curves support to "Draw Curve" operator. This is a direct copy
and replace of the old code to the new editors directly, with a change to
create the new data structure instead of the old one. There is no attempt
at code deduplication, since that would complicate removing the old
curve type when it comes time.

To replace the "2D curve" option a new operator property is added
for projecting to the Z=0 plane.

Pull Request: https://projects.blender.org/blender/blender/pulls/115864
2023-12-11 19:44:19 +01:00
Clément Foucault
3313e9976a Fix: EEVEE-Next: Broken Shadow usage tagging
Broken after recent changes.

Caused by 85f9758302
2023-12-11 19:20:27 +01:00
Hans Goudey
eefe19a7de Fix #115994: Crashes with edit mode tools using custom data correction
Caused by 15cff1fddb reversing source and result arguments.
2023-12-11 13:11:02 -05:00
Hans Goudey
6bc3445e65 Fix: Crash copying BMesh from typo in CustomData copy 2023-12-11 13:11:02 -05:00
Omar Emara
bcea221021 Realtime Compositor: Cache bokeh kernel image
This patch creates a static cached resource from bokeh kernel images,
for better performance and reusability, since it will be used by the
Defocus node as well.
2023-12-11 19:43:03 +02:00
Clément Foucault
4c14557424 Fix: EEVEE-Next: Undefined behavior with only diffuse material
Diffuse materials still needs the feedback buffer for correct
horizon scan.
2023-12-11 18:24:40 +01:00
Clément Foucault
5fa44c0ff8 Fix: EEVEE-Next: Broken HiZ for planar probe
This was caused by missing resources.
2023-12-11 18:09:06 +01:00
Clément Foucault
3df81b0b86 Fix: EEVEE-Next: Planar Probe rendering broken
Was caused by several small mistakes.
2023-12-11 18:08:20 +01:00
Clément Foucault
85f9758302 Fix: EEVEE-Next: Crash when using Planar Probe
This was caused by missing cryptomatte and
depth buffer input for shadow tagging.
2023-12-11 17:27:10 +01:00
Clément Foucault
a32b4ecd83 EEVEE-Next: Make Hi-Z buffer swap on set_source
This fixes a case where the source was set but the
internal pointers for binding were not updated.

This also tag for update internally.

Cleanup and remove the redundant tagging.

This also use the planar depth buffer as layer view.
2023-12-11 17:27:10 +01:00
Miguel Pozo
b484018d42 Fix: EEVEE-Next: ObjectKey
memset is not guaranteed to clear padding bytes,
which breaks the use of memcmp for comparison.
2023-12-11 17:26:04 +01:00
Jeroen Bakker
fa2f9ef33b Vulkan: Generate Correct GLSL After Changing Workarounds
During normal execution it isn't possible to switch workarounds.
However when running test cases we want to check if shaders and
other tests work when work arounds are enabled. Currently shader
patches are cached globally.

This PR moves the cached shader patch to the device level which
is rebuild every time a device needs to be reinitialized.

For OpenGL this is also an issue, but harder to solve as the concept
device doesn't exist there.

Pull Request: https://projects.blender.org/blender/blender/pulls/116042
2023-12-11 16:25:41 +01:00
Clément Foucault
bac94fe307 EEVEE-Next: Make AO node respect the normal input 2023-12-11 14:50:58 +01:00
Clément Foucault
4ed9b4fed0 EEVEE-Next: More work into supporting horizon scan in AO node
This is only part of making inverted scan work.
There are still issues with background not being
considered outside objects.
2023-12-11 14:50:57 +01:00
Clément Foucault
809365d24a Cleanup: EEVEE-Next: Add pipeline defines 2023-12-11 14:50:57 +01:00
Brecht Van Lommel
25e74f0115 Fix (harmless) uninitialized variable usage in Cycles Metal device 2023-12-11 14:46:19 +01:00
Brecht Van Lommel
cf1505d2a5 Fix Cycles division by zero with zero length curves 2023-12-11 14:46:19 +01:00
Brecht Van Lommel
f9d69da432 Build: remove Cycles build options to disable RTTI
This was required for OSL, which used to be compiled entirely without
RTTI for LLVM. However OSL now only compiles a private part of its code
without RTTI, so this no longer necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/116035
2023-12-11 14:42:51 +01:00
Falk David
aa40e9b3c1 Cleanup: GPv3: render engine 2023-12-11 14:23:57 +01:00
Hans Goudey
8157f33911 Cleanup: Move opensubdiv C-API headers to C++
All the relevant code is C++ now, so we don't need to complicate things
with the trip through C anymore. We will still need some wrappers, since
opensubdiv is an optional dependency though. The goal is to make it
simpler to remove the unnecessary/costly abstraction levels between
Blender mesh data and the opensubdiv code.
2023-12-11 07:50:29 -05:00
Jeroen Bakker
01eade9a02 Fix: Assert When Using Shader Builder
Depending on the compiler shader builder could assert due to an
uninitialized attribute. This PR initializes the attribute.

Pull Request: https://projects.blender.org/blender/blender/pulls/116034
2023-12-11 13:41:55 +01:00
Bastien Montagne
750bc5c921 I18N: Updated UI translations from git/weblate (f26db8403b919d). 2023-12-11 12:54:59 +01:00
Bastien Montagne
5179e1e7d7 I18N: Enable Belarusian language in UI translations. 2023-12-11 12:54:59 +01:00
Omar Emara
eabe386e8e Compositor: Use full precision inputs for GPU compositor
Store render pass cache using full precision since some passes will only
make sense in full precision, like Cryptomatte and Z Depth.
2023-12-11 13:22:02 +02:00
Nathan Vegdahl
274dc815eb Fix: update collada export code to use the new bone collections array
I missed this in the previous commit, which broke building Blender.
2023-12-11 12:06:38 +01:00
Nathan Vegdahl
089383a53a Cleanup: rename bArmature.collections -> bArmature.collections_legacy
And leave a TODO to remove it entirely in Blender 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/115931
2023-12-11 10:54:34 +01:00
Jeroen Bakker
1b99987043 GPU: Shader Builder Filter
This PR introduced some filters to improve the workflow when using
shader_builder. Shader builder is used to validate shader compilation
during buildtime and can be enabled using `WITH_GPU_BUILDTIME_SHADER_BUILDER`.

During backend development shader builder is also handy as you can
pin-point it to the shader/backend you're focusing on. Without filters
you would insert temporary code to break on a specific shader.

* `--gpu-backend` can be used to only check a specific backend.
  possible values are `vulkan`, `metal` or `opengl`. When argument
  isn't passed, all backends will be validated.
* `--gpu-shader-filter` can be used to only check a subset or indivisual
  shader. The filter is a name starts with filter. Use
  `--gpu-shader-filter eevee` to validate all eevee shaders

Pull Request: https://projects.blender.org/blender/blender/pulls/115888
2023-12-11 10:44:09 +01:00
Hans Goudey
fb5d03b5ba Fix: Typo in recent commit to BMesh copy function
Mistake in 0b1049b41d used the vertex map for edges.
Thanks to Philipp for pointing this out.
2023-12-10 18:52:24 -05:00