Commit Graph

109498 Commits

Author SHA1 Message Date
Hans Goudey
f181027f6b Cleanup: Rename variable in mesh modifier evaluation
`mesh_final` isn't really the final mesh but the "current" mesh. Adding the
extra word here isn't helpful. This also helps to reduce the size of the diff
in #119968 where the mesh variables have much smaller scopes.
2024-05-20 13:37:15 -04:00
Clément Foucault
8d4576d165 Fix: EEVEE-Next: Discrepancy in GGX pdf and eval function 2024-05-20 19:32:05 +02:00
Hans Goudey
f9f7f25e8d Fix #121880: Node clipboard loses links for dynamic declarations
Some nodes like the simulation input have sockets that depend on
other nodes in the tree, via dynamic declarations. The first fix here
is remapping those inter-node references before adding links and
updating declarations. The second is storing link references with
socket identifiers instead of socket pointers. This is necessary
because the new sockets aren't added to the socket map when the
node is copied. Avoiding pointer storage is also less fragile in general.

Pull Request: https://projects.blender.org/blender/blender/pulls/122013
2024-05-20 19:20:41 +02:00
Hans Goudey
c4fc19f064 Cleanup: Use reference argument for BKE_mesh_copy_for_eval 2024-05-20 13:18:24 -04:00
Hans Goudey
5025c57679 Cleanup: Use references in mesh_data_update.cc 2024-05-20 13:11:18 -04:00
Hans Goudey
a6ecfe2f79 Cleanup: Rename DerivedMesh.cc and header
After recent commits, the .cc file is only used for actual object data
evaluation in the depsgraph, and the header is only used for the old
DerivedMesh data structure that's still being phased out.
2024-05-20 13:11:18 -04:00
Hans Goudey
25b059549b Cleanup: Rename mesh_data_update to mesh_data_update
Mesh object evaluation is unrelated to DerivedMesh nowadays. Change the
name to something similar to the other evaluation functions called in
BKE_object_handle_data_update.
2024-05-20 13:11:18 -04:00
Hans Goudey
5733f6e906 Cleanup: Move mesh evaluation functions to C++ namespace
And move them out of the DerivedMesh header so that can just be used
for the actual DerivedMesh code.
2024-05-20 13:11:18 -04:00
Jacques Lucke
4e3f455f80 Cleanup: move PointerRNA_NULL closer to type definition
This simplifies zero-initializing `PointerRNA` in structs even when
just `RNA_types.hh` is included. Previously, one had to use
`RNA_access.h` to access it. It's also `constexpr` now which can
have small performance benefits in theory.
2024-05-20 18:49:52 +02:00
Clément Foucault
d4b4107d32 EEVEE-Next: Use PDF instead of BSDF for denoising
This adds PDF computation for eval functions as
well as using PDF for spatial denoising.

This seems to not do have any impact but at least
it seems more sounds than bsdf / pdf. Also
computing pdf is cheaper than whole bsdf.

Pull Request: https://projects.blender.org/blender/blender/pulls/121858
2024-05-20 18:13:09 +02:00
Hans Goudey
040bfcee12 Cleanup: Remove unused DerivedMesh code 2024-05-20 11:52:08 -04:00
Hans Goudey
ce104c33d6 Cleanup: Move CDDerivedMesh to new legacy file
Grouping the legacy DerivedMesh code in the same place helps keep
the actively maintained code clearer and clarifies what we are hoping
to remove in the future.
2024-05-20 11:45:57 -04:00
Hans Goudey
f73f3451d9 Cleanup: Move legacy DerivedMesh code to a separate file
Move to a file with the more consistent "mesh_legacy" naming, out of the
modifier evaluation code which has nothing to do with this anymore. That
file can be renamed in a separate step.
2024-05-20 11:40:09 -04:00
Hans Goudey
19aa5b793d Cleanup: Fix const correctness of node find socket function 2024-05-20 11:16:34 -04:00
Hans Goudey
907941309b Cleanup: Remove unused node function declaration 2024-05-20 11:08:27 -04:00
Hans Goudey
5a9a04a990 Cleanup: Use StringRef for node find socket function 2024-05-20 11:08:19 -04:00
Hans Goudey
9b1c6fb04b Cleanup: Use const for edit mesh deformation arguments 2024-05-20 10:14:41 -04:00
Hans Goudey
9e019c33fc Cleanup: Remove unused logger for USD point reader 2024-05-20 10:04:55 -04:00
Hans Goudey
1efbc78b0d Cleanup: Add comment about edit mesh BMesh ownership 2024-05-20 10:00:31 -04:00
Hans Goudey
4e622fbccd Revert "UI: Remove icon usage in brush tool RNA enums"
This reverts commit fd5a790f36.

Fixes #121700
2024-05-20 09:50:28 -04:00
Hans Goudey
cdf59b7355 Refactor: Move preview image runtime data to runtime struct
Follow up for 5445fae9cf

Pull Request: https://projects.blender.org/blender/blender/pulls/122009
2024-05-20 15:24:03 +02:00
Hans Goudey
5445fae9cf Refactor: Use more standard storage for PreviewImage runtime data
Using a non-virtual derived struct for polymorphism is error prone,
especially combined with the requirements of DNA. Instead, use a
separately allocated runtime struct as done for many other DNA structs.

In a followup commit, the remaining runtime members of `PreviewImage`
could be moved to the new runtime struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/121509
2024-05-20 14:25:44 +02:00
Omar Emara
434ad164a8 Fix #121940: Viewport compositor works on part of render
The Viewport Compositor only operates on part of the render when doing
viewport rendering when in camera view. That's because the code wrongly
assumed camera offset even when doing viewport renders, which do not
exist in that case.
2024-05-20 14:27:31 +03:00
Habib Gahbiche
a241790e8f Fix image viewer sampler does not consider image offset
When viewer image is drawn with offset (because of translation in compositor), the sampler doesn't consider the offset, resulting in wrong sampled values

Pull Request: https://projects.blender.org/blender/blender/pulls/121992
2024-05-20 10:56:12 +02:00
Hans Goudey
70b008d18d Cleanup: Fix header location of color attribute fill function
The function was declared in a BKE header but defined in
the sculpt_paint editors module. Move it to the slightly-less
arbitrary ED_sculpt.hh header instead.
2024-05-19 23:28:50 -04:00
Hans Goudey
5687072223 Cleanup: Sculpt: Use return values, C++ types 2024-05-19 23:28:50 -04:00
Hans Goudey
a72dbea01a Cleanup: Sculpt: Use return values for neighbor averaging functions 2024-05-19 23:28:50 -04:00
Hans Goudey
c7feda34ab Cleanup: Private member naming in PaintingKernel 2024-05-19 23:28:50 -04:00
Hans Goudey
85e5f38279 Cleanup: Use lambda instead of simple callback
Pull Request: https://projects.blender.org/blender/blender/pulls/121980
2024-05-20 02:58:15 +02:00
Hans Goudey
0ef1541834 Cleanup: Use C++ arrays in mesh batch cache 2024-05-20 02:58:13 +02:00
Hans Goudey
da32aeb455 Cleanup: Use C++ types for various mesh array arguments
Also remove duplicated code for creating an array of BMesh positions
2024-05-20 02:58:13 +02:00
Hans Goudey
e916cd5d69 Mesh: Simplify triangle draw extraction slightly
- Don't store triangulation or triangle face indices in MeshRenderData.
  This makes more automatic use of the lazy calculation and saves the
  calculation of the face indices in some cases.
- Don't use the "extractor" abstraction for the triangle index buffer.
  This is part of the ongoing transition described by #116901.
- Pass the "face sorted" data directly to the triangle index buffer
  creation. That's the only place that needs it. This makes the
  dependencies more explicit and might make better use of CPU cache.
2024-05-20 02:58:13 +02:00
Hans Goudey
3f6217c208 Cleanup: Sculpt: Use const and references
Just a general propagation of const and references, mainly for
`Object` and `SculptSession` variables, but also others.

Pull Request: https://projects.blender.org/blender/blender/pulls/121993
2024-05-20 02:56:25 +02:00
Campbell Barton
669fad29e9 Cleanup: clarify doc-strings for BLI_fftw
Reserve comments immediately before the function for doc-strings in
the header. Otherwise both are candidates as doc-strings.
2024-05-20 10:29:22 +10:00
Campbell Barton
d8a05e20a0 Cleanup: resolve missing declaration warnings 2024-05-20 10:25:31 +10:00
Campbell Barton
096eed9d7f Cleanup: spelling in comments 2024-05-20 10:23:54 +10:00
Campbell Barton
db617bc07b Cleanup: quiet warning mixing int/enum 2024-05-20 10:13:20 +10:00
Campbell Barton
72627a9d84 CMake: correct GCC's template-id-cdtor warning being suppressed 2024-05-20 10:10:55 +10:00
Iliya Katueshenock
14233be92f Nodes: hide reroute input socket in sidebar
The same as d27a1c47fa. Reroute node is
value-less and there is no actual value of input socket that should be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/121150
2024-05-19 21:35:10 +02:00
Vitaljok
7d5cd60023 EEVEE-Next: adding framebuffer viewport reset to Film
Fix #121782

`GPencil` engine renders on the whole framebuffer.
If `Render region` is used, the result of GP rendering is scaled from whole
framebuffer down to the selected region.

The fix adds framebuffer viewport reset after rendering.
This resolves the problem for downstream consumers of
the framebuffer (e.g. `GPencil`).

The final result is somewhat similar to the `EEVEE Legacy`.
Now `EEVEE` rendering is done in the selected region, while `GPencil`
is rendered on whole viewport as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/121979
2024-05-19 19:02:02 +02:00
Clément Foucault
5a83346b47 Fix: EEVEE-Next: Broken Shader compilation 2024-05-19 16:58:40 +02:00
Jacques Lucke
d1782f13c8 Nodes: show extra info tooltip when hovering over text
Previously, the tooltip was only shown when hovering over the icon.
2024-05-19 14:41:28 +02:00
Clément Foucault
71d5e49db8 Fix: EEVEE-Next: Nvidia shader compilation error
Fix #121968
2024-05-19 13:52:50 +02:00
Jacques Lucke
77d6d7e502 Cleanup: improve naming of node link flag 2024-05-19 13:19:36 +02:00
Harley Acheson
24873963a6 BLF: String length to cursor position, not INT_MAX
BLF_str_offset_from_cursor_position is being called with a str_len of
INT_MAX, so max buffer size instead of string length. This works fine
right now but will not when this gets more complex. For example if we
need to call functions like BLI_str_cursor_step_next_utf8, which
assumes that str_len is the actual end of the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/121966
2024-05-19 05:53:56 +02:00
Sean Kim
99505b58e9 Cleanup: Remove unncessary prefixes in sculpt_face_set.cc
* Removes unnecessary `sculpt_face_set` prefixes
* Reorganizes some methods

Pull Request: https://projects.blender.org/blender/blender/pulls/121895
2024-05-18 22:18:43 +02:00
Clément Foucault
ba147831a4 Fix: EEVEE-Next: Remove uneeeded dependencies
This fix some missing binding errors.
2024-05-18 19:28:23 +02:00
Clément Foucault
46a61f795e Fix: EEVEE: Shadow: Assert when saving file 2024-05-18 19:17:42 +02:00
Clément Foucault
6a0fb5c35f Fix: EEVEE-Next: Shadow: Clip Rays inside the light shape
This fix the noise issue caused by shadow tracing.
2024-05-18 18:01:24 +02:00
Clément Foucault
e0b3dee35a EEVEE-Next: Jittered Soft Shadows
Jittered Soft Shadows support.
Improves soft shadow quality at the cost of re-rendering shadow maps every sample.
Disabled by default in the viewport unless enabled in the Scene settings.

| Tracing-only | Jitter-only | Jitter+Over-blur |
| --- | --- | --- |
| ![imagen](/attachments/e5ca6120-0666-4e86-b6e0-3d7512587b86) | ![imagen](/attachments/a72631aa-14f8-4e10-a748-848fc4bd4ab2) | ![imagen](/attachments/07c5de65-61d2-48e7-b78c-9c3cbdcaf844) |

Tracing-only is the method used by default in EEVEE-Next.
Jitter-only is the method used by EEVEE-Legacy Soft Shadows.
Jitter+Over-blur combines both.

Co-authored by Miguel Pozo @pragma37 (initial patch #119753)

Pull Request: https://projects.blender.org/blender/blender/pulls/121836
2024-05-18 17:21:47 +02:00