Age | Commit message (Collapse) | Author |
|
float8 is a reserved type in Metal, but is not implemented. So rename to
float8_t for now.
Also move back intersection handlers to kernel.metal, they can't be in the
class that encapsulates the other Metal kernel functions.
|
|
Use an imperfect solution, since this code will be replaced soon anyway.
|
|
The recent multires winding fix missed a code branch.
|
|
This now use default angle precision which matches the sun rotation.
Feeling is much more natural.
|
|
The issue was introduced by rBad5e3d30a2d2 which made possible to use
unbounded elevation angle.
In order to not touch the shading code, we just remap the value to the
expected range the shading code expects. This means that elevation angles
above +/-PI/2 effectively flip the sun rotation angle.
|
|
There is a 1 pixel error in the size registered for the buffer
dimensions.
NOTE: This issue indicates that the texture scale is different from the
region, so the mouse-based coordinates used are actually misaligned.
This misalignment will be fixed in another commit.
Regression probably introduced in rB1d49293b8044 + rB45f167237f0c8
|
|
The "snap to surface" operators now have "disabled" poll messages
when there is no surface object.
The implementation in most curves operators is also unified.
The goal is to avoid having to define and use the poll failure messages
in multiple places, to reduce the boilerplate that tends to be
necessary to add an operator, and to increase the likelihood that
operators are implemented with proper poll messages.
Differential Revision: https://developer.blender.org/D15528
|
|
|
|
This was tested in some places to check if code was being compiled for the
CPU, however this is only defined in the kernel. Checking __KERNEL_GPU__
always works.
|
|
This patch adds required math functions for float8 to make it possible
using float8 instead of float3 for color data.
Differential Revision: https://developer.blender.org/D15525
|
|
Having the OptiX/MetalRT/Embree/MetalRT implementations all in one file with
many #ifdefs became too confusing. Instead split it up per device, and also
move it together with device specific hit/filter/intersect functions and
associated data types.
|
|
This commit adds tooltips to the geometry nodes add menu.
Differential Revision: https://developer.blender.org/D15414
|
|
No need anymore to have a difference between CPU/GPU, all distances
remain in world space.
|
|
All our intersections functions now work with unnormalized ray direction,
which means we no longer need to transform ray distance between world and
object space, they can all remain in world space.
There doesn't seem to be any real performance difference one way or the
other, but it does simplify the code.
|
|
This helps with debugging, and gives a slightly closer match between CPU
and CUDA/HIP/Metal renders when it comes to ray tracing precision.
|
|
This fixes two issues:
* There was a crash when the new attribute name was empty.
* The attribute name was incremented (e.g. "Attribute.001") when
the old and new name were the same.
|
|
Cyclic curves don't need the tangent correction based on the first
and last handle position.
|
|
|
|
|
|
|
|
Proposed solution by @scurest The color attribute in the RNA was tagged as
COLOR_GAMMA. This change will change it to a regular COLOR.
{F13217692}
Reviewed By: joeedh, jbakker
Maniphest Tasks: T99036
Differential Revision: https://developer.blender.org/D15272
|
|
It looked up the vertex group index based on the object instead of the
actual mesh that is currently used. Since geometry nodes, the number
and order of attributes can change in arbitrary ways during evaluation.
Therefore, this index has to be looked up on the mesh which contains
the most up-to-date information.
There are probably similar issues in other modifiers. That has to be
fixed step by step. Ideally by using the attribute api directly eventually.
|
|
When dragging assets into the 3D View while in any other mode than
object mode, dropping would be disabled and the cursor would indicate
that. However there was supposed to be an "Only supported in object
mode" message, that similar operators showed, but got forgotten when
this one was introduced.
|
|
UV maps that are used for surface attachment must not have overlapping
uv islands, because then the same uv coordinate would correspond to
multiple surface positions.
Ref T99936.
|
|
|
|
|
|
|
|
Only a few are kept not available as their features are not yet supported.
|
|
-march=native is not supported for all architectures.
|
|
|
|
Calling two non-const methods on a `MutableAttributeAccessor`
at the same time in multiple threads is not safe.
While I don't know what caused the crash here exactly, I do know
that it happens while looking up the attribute for writing, which
may modify the unterlying geometry. I couldn't reproduce the
bug with a debug build or without threading.
|
|
When texture painting a lot of time is spent in ED_image_paint_tile_find.
This fixes stores the PaintTiles in a blender::Map making ED_image_paint_tile_find an O(1) rather than O(n) operation.
When using threading the locking should happen during read as well,
still this gives a boost in performance as the read is now much faster.
Reviewed By: jbakker
Maniphest Tasks: T99546
Differential Revision: https://developer.blender.org/D15415
|
|
In a test producing 10 million vertices I observed a 3.6x improvement,
from 470ms to 130ms. The largest improvement comes from calculating
each mesh array on a separate thread. Besides that, the larger changes
come from splitting the filling of corner and face arrays, and
precalculating sines and cosines for each ring.
Using `parallel_invoke` does gives some overhead. On a small 32x16
input, the time went up from 51us to 74us. It could be disabled
for small outputs in the future. The reasoning for this parallelization
method instead of more standard data-size-based parallelism is that the
latter wouldn't be helpful except for very high resolution.
|
|
renamed
As discussed, this only updates objects in and the world of the scene to which the view layer belongs, which also avoids the problem of not having a BMain available.
Differential Revision: https://developer.blender.org/D14740
|
|
The Alembic importer uses a linear search over the mesh edges to find
the right edge when setting edge creases. Although the complexity is
`O(m * n)`, with `m` being the number of creased edges, and `n` being
the number of edges, this can lead to a quadratic complexity as `m`
approches `n`.
This patch uses `EdgeHash` to store and retrieve the edges, which
should bring complexity closer to `O(n)`, provided that lookup is
`O(1)`.
See differential for some timings. In most files, this is expected
to give at least a 2-3x speedup for this operation, but can lead
orders of magnitude speed increase for dense meshes with a significant
number of edge creases.
Differential Revision: https://developer.blender.org/D15521
|
|
|
|
Use the C++ API to implement more of the existing C functions.
This corrects the cases where one tries to add a builtin attribute
with the wrong domain or type on curves, though a better warning
message would be helpful in the future, and also reduces duplication
of the internal logic. Not much more is possible without changing
the interface.
|
|
This avoids correlation artifacts with the jitter pattern itself.
Also try to reduce the visible spiral pattern.
|
|
The display depth is used to composite Gpencil and Overlays. For it to
be stable we bias it using the dFdx gradient functions. This makes
overlays like edit mode not flicker.
The previous approach to save the 1st center sample does not work anymore
since we jitter the projection matrix in a looping pattern when scene
is updated. So the center depth is only (almost) valid 1/8th of the times.
The biasing technique, even if not perfect, does the job of being stable.
This has a few cons:
- it makes the geometry below the ground plane unlike workbench engine.
- it makes overlays render over geometry at larger depth discontinuities.
|
|
|
|
|
|
This might make the image a bit blurier but it reduces the flickering of
shiny surfaces during animation.
This uses the technique described in "High Quality Temporal Supersampling"
by Brian Karis at Siggraph 2014 (Slide 45): Reduce the exponential factor
when the history is close the bounding box border.
|
|
A few offsets were missing.
Reminder that this does not change the actual render resolution but it
reduces the VRAM consumption of accumulation buffers.
|
|
|
|
|
|
No functional changes.
|
|
Use the new attribute API to implement the attribute remove function
used by RNA, except for BMesh attributes. Currently, removing curve
attributes from the panel in the property editor does not mark the
relevant caches dirty (for example, the cache of curve type counts),
because that behavior is implemented with the new attribute API.
Also, eventually we want to merge the two APIs, and removing an
attribute is the first function that can be partially implemented
with the new API.
Differential Revision: https://developer.blender.org/D15495
|
|
... as a debug option.
|
|
There was a confusion about what space the offset was in.
|
|
The face merging code in exact boolean made an assumption that
the tesselated original face was manifold except at the boundaries.
This should be true but sometimes (e.g., if the input faces have
self-intersection, as happens in the example), it is not.
This commit makes face merging tolerant of such a situation.
It might leave some stray edges from triangulation, but it should
only happen if the input is malformed.
Note: the input may be malformed if there were previous booleans
in the stack, since snapping the exact result to float coordinates
is not guaranteed to leave the mesh without defects.
This is the second try at this commit. The previous one had a typo
in it -- luckily, the tests caught the problem.
|