This allows an engine to perform GPU side view specification and let the
draw manager extract the culling informations (bounds).
To this end, the matrices ubo gets exposed to be able to write to it.
`compute_procedural_bounds()` need to be explicitely called before any
main pass using the culling result.
This abstraction is rarely used. It could be replaced by some more
general "query" API in the future. For now it's easier to just compare
pointers in the Set Position node where this was used.
This is possible now, because mesh positions are stored as flat `float3`
arrays (previously, they were stored as `MVert` with some other data
interleaved).
This changes how we access the points that correspond to each curve in a `CurvesGeometry`.
Previously, `CurvesGeometry::points_for_curve(int curve_index) -> IndexRange`
was called for every curve in many loops. Now one has to call
`CurvesGeometry::points_by_curve() -> OffsetIndices` before the
loop and use the returned value inside the loop.
While this is a little bit more verbose in general, it has some benefits:
* Better standardization of how "offset indices" are used. The new data
structure can be used independent of curves.
* Allows for better data oriented design. Generally, we want to retrieve
all the arrays we need for a loop first and then do the processing.
Accessing the old `CurvesGeometry::points_for_curve(...)` did not follow
that design because it hid the underlying offset array.
* Makes it easier to pass the offsets to a function without having to
pass the entire `CurvesGeometry`.
* Can improve performance in theory due to one less memory access
because `this` does not have to be dereferenced every time.
This likely doesn't have a noticable impact in practice.
Differential Revision: https://developer.blender.org/D17025
Struct members loc/size were misleading as they read as if the object
data stored object level transform channels. Rename these to match RNA
with a `texspace_*` prefix to make it clear these struct members only
apply to texture-space transform.
Also rename ME_AUTOSPACE & ME_AUTOSPACE_EVALUATED to
ME_TEXSPACE_FLAG_AUTO & ME_TEXSPACE_FLAG_AUTO_EVALUATED.
Give the "Value" input a higher search weight than the "Index"
input, since it's more likely that users will want to connect to
that. Based on feedback from Simon Thommes.
Socket declarations exist all the time and it would be useful to use
them for tooltips at all times, not just when there is a computed log.
Differential Revision: https://developer.blender.org/D16846
Avoid calling `interpolate_to_evaluate` while evaluating normals,
which has to look up attributes by name for every curve. Also avoid
duplicating the curve type switch in a few functions. I didn't observe
a performance difference, but theoretically this could reduce
overhead for many small curves.
Due to precision issues, the cosine value calculated with
`dot_v3v3(start, end)` can be outside the -1, 1 range causing `acosf`
to return `nan(ind)`.
Use `angle_signed_on_axis_v3v3_v3` instead. It returns more accurate
values, deduplicates code, and avoids these `nan` issues.
Since 90ea1b76434fe175e9, node trees have been reevaluated
after many selection operations because nodes are sorted based on
the selection status and an update tag was added for that. However,
for years the node order was allowed to be different between the
original and evaluated copy of node trees.
Though it is a bit sketchy to have that difference in the evaluated
node tree, reevaluations for just selection are very bad, so use a
"smaller" update tag and add a comment for justification.
Differential Revision: https://developer.blender.org/D17023
wi is the viewing direction, and wo is the illumination direction. Under this notation, BSDF sampling always samples from wi and outputs wo, which is consistent with most of the papers and mitsuba. This order is reversed compared with PBRT, although PBRT also traces from the camera.
The order of arguments to memcpy was reversed, which is sadly possible
because the constness `KeyBlock` of keyblock doesn't propagate to
pointers it contains.
Caused by 6769acbbba7f.
Some of the matrix variants are rather obscure from the
semantic: they don't really fully initialize the output:
as in, they only write to an upper-left 3x3 block.
A quick solution to fix the very commonly used constraint.
It feels that it is possible to minimize about of copy
operations.
The Grease Pencil Material Popover currently has a color picker
for the Stroke of a Material using Solid style, but not one for
a Fill using Solid style.
With the default Grease Pencil Materials, the current
popover only shows the Stroke color for the grey "Solid Fill"
material (which doesn't have its Stroke enabled) instead of
the more useful Fill color.
This patch shows a Stroke color picker when the Material
has Stroke enabled and the style is Solid.
This is the same for the Fill.
Reviewed By: antoniov, mendio
Differential Revision: https://developer.blender.org/D17004
Previously, the node would always evaluate the input field on the
entire geometry domain. This is good when most indices will be
accessed afterwards. However, it is quite a bad when only a single
index is used. Now the field is only evaluated for that one index.
Remove:
- IDPropertyTemplate.matrix_or_vector
Matrix & vector types have been deprecated, this wasn't used.
- IDProperty.saved
This was added preemptively but never used, replace with a pad so as
not to hint at a feature that doesn't exist.
This reverts commit 154d3e95f862fd680879267b03bb050ffa178d05.
This caused crashes in the mouse house and flower shop benchmark files.
A proper solution will be investigated soon.