But it below the `else` case to make the control flow clearer, since
in the end that is more important. Also clarify the wording and fix
grammar slightly.
Similar to previous commits, avoid using pointers that are redundant
to their corresponding index. Also avoid storing the edge vectors stack
in the data-per-loop when it can just be a function argument.
Face corner normals are calculated when auto smooth or custom
per-corner normals are used.
This brings the per-face-corner data from 64 to 24 bytes, as measured by
`sizeof`. In a large test file I observed a 20% performance improvement,
from 285 to 239 ms.
The loop was also retrievable with the index. This needed some care
though, because previously the index became "detached" from the
corresponding MLoop pointer for a short time.
Since face corner indices are available, using pointers to MLoop and
other data is redundant. Using fewer local variables means there is less
state to keep track of when reading the algorithm, even if it requires
more characters in some cases.
The `lnor` pointer was only used for fans containing a single face,
and can be retrieved for a specific loop from the common data anyway.
Also saves 8 bytes per corner during the calculation
Add `bNode::index()` to allow accessing node indices directly without
manually de-referencing the runtime struct. Also adds some asserts to
make sure the access is valid and to check the nodes runtime vector.
Eagerly maintain the node's index in the tree so it can be accessed
without relying on the topology cache.
Differential Revision: https://developer.blender.org/D16683
This adds an explicit post processing step to node declarations.
The purpose of this is to keep the actual node declaration functions
concise by avoiding to specify redundant information. Also it improves
the separation of the creation of the declaration from using it.
This made it harder to change these functions in the future.
No functional changes are expected and the versioning worked correctly
in my test with a files created in Blender 2.69.
Adding the sockets in the function was not necessary in my test, because
those were already added before as part of `node_verify_sockets` in
`ntreeBlendReadLib`. I kept it in just to be on the safe side.
The problem was the bounding box was calculated using
all strokes, but if a filter is added, the bounding box must
include only selected strokes.
Fix by @frogstomp
Improve a few messages, but mostly fix typos in many areas of the UI.
See inline comments in the differential revisiion for the rationale
behind the various changes.
Differential Revision: https://developer.blender.org/D16716
Using a cache greatly simplifies access to the output node.
I touched on the most common and understandable cases for me.
The texture nodes were touched because it looked pretty generic.
Differential Revision: https://developer.blender.org/D16699
Add preferred domain based on the "Value" input field. Most often,
the domain must match the original domain for the value.
Differential Revision: https://developer.blender.org/D16730
Apple notarization rejects packages containing them.
Similar to rpaths we handle generically this as part of the harvest step rather
than patches individual library builds systems.
Ref T99618
This allows using the "On Cage" feature in edit mode to interact with
original mesh elements via the newly created geometry. The original
indices are only set for new elements that copy attribute values
from original elements directly, so it can also be a helpful way
to visualize attribute propagation.
The change was simplified by refactoring the individual mode slightly
to create separate index maps for the new edges and vertices. That
simplified attribute copying a bit too.
This is partially a bug fix, since the original index layer wasn't
handled at all before, and could be left initialized. That was caused
by my recent change to modify a mesh in place rather than create a
new one. Also copy over any orco data, which was another unhandled
layer type.
It's also a new feature though, since it allows using the "On Cage"
feature of edit mode to adjust original mesh elements by selecting
the new ones. This brings the functionality inline with the Edge Split
modifier.
- Added comment for additional tasks to do when bumping python
- updated sqlite to 3.39.4
- downgrade setuptools to 63.2.0 to avoid numpy build issues
- numpy 1.23.5
Don't use the same "context" struct for tagging sharp edges from auto-
smooth / poly flags and actually calculating face corner normals. That
required more arguments, and it required breaking const slightly to
reuse the code. Also split apart pre-populating corner normals
with vertex normals, since it isn't related at all and is only used
in one code path.
Image engine uses 4 gpu textures that are as large as the area being
drawn. The amount of needed GPU memory can be reduced by dividing the
region in smaller parts. Reducing the GPU memory also reduces the stalls
when updating the textures, improving the performance as well.
This optimization works, but is disabled for now due to some rounding
errors that drawn lines on the screen where the screen is divided.
It used to be a number of fixed full screen images where the
responsibility was at image engine. Now moved the responsibility to the
drawing mode to make sure we can allocate non-full region-size textures
in a future refactoring.
`get_gpu_textures` was created when the image engine didn't support
texture streaming and used the gpu textures that were stored in the
image buffer itself.
This patch implements the Simple Star Glare node. This is only an approximation
of the existing implementation in the CPU compositor, an approximation that
removes the row-column dependency in the original algorithm, yielding an order
of magnitude faster computations. The difference due to the approximation is
readily visible in artificial test cases, but is less visible in actual use
cases, so it was agreed that this approximation is worthwhile.
For the future, we can look into approximating this further using a closed form
IIR recursive filter with parallel interconnection and block-based parallelism.
Which is expected to yield another order of magnitude faster computations.
The different passes can potentially be combined into a single shader with some
preprocessor tricks, but doing that complicated that code in a way that makes
it difficult to experiment with future optimizations, so I decided to leave it
as is for now.
Differential Revision: https://developer.blender.org/D16724
Reviewed By: Clement Foucault
This patch implements the Ghost Glare node. It is implemented using
direct convolution as opposed to a recursive one, which produces
slightly different results---more accurate ones, however, since the
ghosts are attenuated where it matters, the difference is barely
visible and is acceptable as far as I can tell.
A possible performance improvement is to implement all passes in a
single shader dispatch, where an array of all scales and color
modulators is computed recursively on the host then used in the shader
to add all ghosts, avoiding usage of global memory and unnecessary
copies. This optimization will be implemented separately.
Differential Revision: https://developer.blender.org/D16641
Reviewed By: Clement Foucault
These functions were originally implemented because:
- Not all of them existed pre C++17, but now we are using C++17.
- The call stack depth is quite a bit deeper with the std functions, making
debugging slower and more annoying. I didn't find this to be a problem
anymore recently.
No functional changes are expected.
Nodes which are common in multiple editors (RGB, Value, Switch, RGB to BW)
has less width in compositor editor. Patch changes compositor node width to
140 for consistency.
Reviewed by: HooglyBoogly
Differential Revision: https://developer.blender.org/D16719