This fixes a few issues and clear up some confusion
in the code.
Note that this changes the behavior of render region;
they now reduce the internal render size. This is
matching the new design documentation.
- Data passes have correct accumulation.
- Adhere to naming conventions for extents, film and render pixels.
- Jitter over final pixels first before doing random sampling
in order to speed up convergence.
- Ensure enough sample to cover at least all the film pixels once.
- Always include the four neighbor pixels in case one is nearer.
- Fix projection matrix computation to align overscan pixels.
Pull Request: https://projects.blender.org/blender/blender/pulls/124735
EEVEE can bind layers of a texture that is also used as an attachment. When binding
the image layout of these specific layers can be different that the image layout of
the whole image.
This fixes the known synchronization issues inside EEVEE. wasp_bot, tree_creature and
wanderer scenes can be rendered without any synchronization issue reported by the
Vulkan validation layers.
Design task: #124214
When beginning to render the attachments are being evaluated. If there is an arrayed
texture (with multiple layers) the individual layers of that texture can be tracked
during until the rendering is ended.
When the same texture is bound to a shader it will be a different layer (otherwise
there is a feedback loop, which isn't allowed). The bound layers will typically need
a different layout the transition to the new layout is executed and recorded. When
the rendering ends, the layers are transitioned back to the layout the texture is
expected in.
It can happen that a layer is used multiple times during the same rendering. In
that case the rendering should be suspended to perform the transition. Image layout
transitions are not allowed during rendering.
There is one place where a layer needs to be transited multiple times that is when
EEVEE wants to extract the thickness from the shadow. The thickness is stored inside
the gbuffer_normal which is also used as an attachment. Eval then samples the thickness
from the gbuffer_normal as a sampler. To work around this issue we suspend the rendering
when a `GPU_BARRIER_SHADER_IMAGE_ACCESS` is signaled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124407
Retiming draw order changes in d0cf4a4a8b accidentally broke VSE
thumbnails. The order of drawing became "for each strip: draw thumbnail,
draw retiming continuity".
But the "draw retiming" bit was changing the projection matrix, which
placed all the later thumbnails at nonsensical locations.
Fixup it so that:
- First all thumbnails are drawn, then all retiming continuities.
- Retiming continuity drawing sets up matrix just once, instead of
doing all that work for each strip.
- And it also restores the previous projection matrix after it is done.
- Also, can_draw_retiming now says "false" when no retiming keys are
present. Previously, code was going into possibly expensive drawing
setup for any strip, even when the is nothing to draw.
Pull Request: https://projects.blender.org/blender/blender/pulls/124780
When trying to delete keys from a layered action in the viewport
using ALT+I and no keyingset is set, no keys would be deleted.
That is because the code hasn't been updated to work with layered actions yet.
The fix is to check if the action is layered and iterate the
FCurves depending on how they are stored.
For this to work nicely I had to extract the function `delete_key_fcurve`.
Pull Request: https://projects.blender.org/blender/blender/pulls/124619
All the arrays in the new Action DNA are named singularly (`layer_array`,
`fcurve_array` etc). `channelbags_array` was the only plural one. For
consistency, this is now also singular.
Note that this is a backward-incompatible change, and will effectively
erase all animation from layered Actions. No effort is taken to handle this
rename as the feature is still in its experimental phase.
Action and slot assignments are not affected by this change.
Apart from the lack of backward compatibility, no functional changes are
expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/124768
If a strip had effect strips applied on it, and using the reset
retiming operator caused the strips to increase in length, the effect
strips would become overlapped with any strips they hit, unless the
"Expand" overlap mode was used.
This is because the "effect chain" strips weren't included
in #strips.
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124750
This was originally fixed in 8ecccddf1c but for some reason
the merge to main didn't include those changes
merge commit: 2e03ca4a5b
The issue was that the wire width was not passed to the shader when using curve objects.
This PR is just the cherry picked changes from the original commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/124774
For very small hotspot regions when trying to select handles on adjacent
strips, selection can sometimes jump to the strip farthest away from the
current mouse cursor position. This happens regardless of "Tweak
Handles" setting, but is most noticeable when it is off.
In the case that two strips are selected at once (which is possible
because internally strip handles are shifted away from the strip body by
a third of the handle size), `mouseover_strips_sorted_get` attempts to
sort these strips to maintain priority, but the logic was backwards --
fix the glitch by sorting strips such that the first strip in the
`Vector` is always the strip closest to the mouse cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/124708
Was using the old, not the modified name of the brush to build the brush
asset reference, that is used to identify the active brush asset.
The new brush was actually activated, but some of the UI like the asset
shelf would display it as such.
The fix contains two parts:
1. Grease Pencil v3 now stores stroke `init_time` as a float attribute,
it's not enough precisiton for unix timestamp. Now the time value is
truncated to allow better precision. It's still stored in seconds.
2. The previous logic for calculating stroke gap time of the build
modifier isn't correct, it used to only count two starting times as
gap time. Now it's fixed with correct delta time.
Pull Request: https://projects.blender.org/blender/blender/pulls/124350
MNEE tests were disabled on Metal due to the feature not being
supported in macOS < 13.
This commit enables MNEE tests on Metal GPUs if they are using
macOS >= 13, otherwise leave it disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124709
The motivation is to be able to catch issues like #124705 early on,
by relying on asserts.
The not-so-obvious part of the change is the change in the order of
includes, which is needed for the types.h to have definition of the
kernel_assert().
Pull Request: https://projects.blender.org/blender/blender/pulls/124729
This commit removes the extra initial_pivot_position variable from
SculptBoundary as well as the PBVHVertRef in favor of a single float3.
This value is effectively const for the lifetime of the struct in the
current state, as this value is only calculated and used at the
beginning of the brush stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124755
This commit replaces the PBVHVertRef with specific float3 positions for
the edges. To ensure data is displayed correctly, we also remove the
conditional check on updating this data when drawing the cursor to
force recaculating the edge positions on the start of every brush
stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124754
Issue happened in very old files only (pre 2.38), where versioning would
allocate tool-settings, without calling initialize logic for painting.
This should be fine, just handle the case properly where initialization
happens later, once the paint mode is actually entered.
Also adds missing default brush setting for this corner-case, where
texture paint data gets initialized only when entering the mode.
Part of #118145.
This brush first stores an array of translations for each vertex and
then reuses those translations for the rest of the stroke. I added
a few utilities to simplify storing the data for all vertices for the
multires and BMesh implementations. Compared to the old code,
computing the translations is skipped for completely hidden or
masked nodes. Also we don't skip hidden neighbors since that gives
better results. That wasn't as easy with the old API.
Pull Request: https://projects.blender.org/blender/blender/pulls/124569
Unions make handling of non-trivial data 'members'... non-trivial.
Since `PointerRNA` is going to become non-trivial, this commit replaces
the Union storing delta, min and max values of editied RNA properties
in `ui_selectcontext_apply`, into a `std::variant`.
It also adds a new accessor to RNA string properties, returning a
`std::string` data, and uses this type to store string properties values
in `ui_selectcontext_apply`.
Pull Request: https://projects.blender.org/blender/blender/pulls/124727
There was a case where we wouldn't convert edit curves correctly,
specifically when the user created an edit curve
(using "Curve Editing") and then changes the stroke outside of
curve editing. This invalidates the edit curve, but does not
deallocate it.
The conversion assumed that any allocated edit curve is valid.
Now we check for the `GP_CURVE_NEEDS_STROKE_UPDATE` flag
to skip invalid edit curves (and use the stroke instead).
color was not taken into consideration when picking a closure using
reservoir sampling, giving closures with dark color much higher weights
than they should have.
This fix multiplies the weight by the average color when picking the
closure, similar as what has been done in principled BSDF.
Pull Request: https://projects.blender.org/blender/blender/pulls/124730
This commit moves generated `RNA_blender.h`, `RNA_prototype.h` and
`RNA_blender_cpp.h` headers to become C++ header files.
It also removes the now useless `RNA_EXTERN_C` defines, and just
directly use the `extern` keyword. We do not need anymore `extern "C"`
declarations here.
Pull Request: https://projects.blender.org/blender/blender/pulls/124469
Update the string hashs in SSS OSL closure setup so they match the
strings being used by the SSS node.
This fixes two issues in OptiX OSL:
- SSS Random Walk would render as Random Walk Skin.
- Random Walk Skin wouldn't render at all.
Pull Request: https://projects.blender.org/blender/blender/pulls/124707
This PR will share render graphs between all contexts that run in
the same thread. This allows the draw manager commands to be added
to the same render graph as the UI.
- Fixes debug groups hiearchy. Draw manager would restart a hierarchy as
it wasn't aware of the debug groups already added by the UI
- Removes cpu sync when switching between contexts.
In a future change this is needed to improve discarding resources.
Pull Request: https://projects.blender.org/blender/blender/pulls/124715
- Fixes incorrect handling of incompatible engines. There is a global list of compatible
engines, but `create_cycles_material` didn't use it, displaying an incorrect warning
when using the operator.
- Add `BLENDER_EEVEE_NEXT` to compatible engines.
- Remove `BLENDER_EEVEE` from compatible engines.
- Add render method option. This replaces the material `blend_method`
- Remove material blend method option (replaced by `render_method`)
- Remove material shadow option. Not needed anymore as shadows use
the node tree for evaluation.
**TODO**
- Manual should still be updated. Will be done after this patch lands.
- I did some basic tests. I am not familiar with this operator, but think it
should handle all the different cases. Would be nice to have some
render tests for this to detect regressions.
Implements: #122315
Pull Request: https://projects.blender.org/blender/blender/pulls/124094