First this make the wire batch use the same set of drawing that the main
gpencil batch uses (as they share the same VBO data, they need to use
the same drawings).
Then we skip drawing the onion frames by nullifying the indices in the
index buffer. A better way would be to skip these strokes or drawing
but that can be done later and seems more bug prone.
Pull Request: https://projects.blender.org/blender/blender/pulls/129920
The issue was that the masks for the current frame would be
rendered for a different frame.
Unfortunately, we can't easily render masks for the onion
skinned frames correctly at the moment.
The fix makes it so that we render the mask only for the current frame.
Pull Request: https://projects.blender.org/blender/blender/pulls/129878
Possibly due to c13cde24cc
This commit clamps the `brush->size` value to 1 at lowest for the
Grease Pencil Draw mode. There are situations where when the brush scene
space value is set to a small enough size that the distance calculated
by `project_brush_radius` becomes 0.
When this value is set as the actual brush size, the `wm.radial_control`
operator fails to work properly as the new size is now lower than the
expected minimum value, causing incorrect clamping of the modal value.
Pull Request: https://projects.blender.org/blender/blender/pulls/129937
Possibly due to c13cde24cc
This commit clamps the `brush->size` value to 1 at lowest for the
Grease Pencil Draw mode. There are situations where when the brush scene
space value is set to a small enough size that the distance calculated
by `project_brush_radius` becomes 0.
When this value is set as the actual brush size, the `wm.radial_control`
operator fails to work properly as the new size is now lower than the
expected minimum value, causing incorrect clamping of the modal value.
Pull Request: https://projects.blender.org/blender/blender/pulls/129937
Drivers should perform a limit check when creating images and return
`VK_ERROR_OUT_OF_DEVICE_MEMORY`. However there are drivers where this
check is a pass-through and leads to `VK_ERROR_DEVICE_LOST`.
This issue was introduced !128877 and only shows up on official NVIDIA
drivers.
Pull Request: https://projects.blender.org/blender/blender/pulls/129939
There is an issue in the GPU depth picking that is only visible
in official AMD/NVIDIA drivers. AMD does pick objects that are
around the cursor. NVIDIA drivers include any overlay objects.
This PR will disable GPU pick selection for AMD/NVIDIA official
drivers. This will limit some selection functionality.
This PR will be reverted in Blender 4.4 to find the root cause.
Ref: #128624, #127768
Pull Request: https://projects.blender.org/blender/blender/pulls/129863
When using a lot of instances the requested and needed attributes
are merged. This process uses a lock even when no work needs to be
done.
By early exiting the merging process when no work needs to be done
the performance of navigating 60k cubes went from 17.5 fps to 18.3 fps.
Detected when researching #126391.
Pull Request: https://projects.blender.org/blender/blender/pulls/129791
This implements the "Select Linked Pick" operator, by default exposed
in the keymap with `L` and `Shift-L`. This mirrors the existing operator
in legacy-curve edit mode and mesh edit mode.
The implementation is pretty simple, we just find the curve closest to
the mouse and change the selection of the points in that curve.
Pull Request: https://projects.blender.org/blender/blender/pulls/129885
This allows to use `assert()` directly inside shader source.
The current implementation is just replacing it with a printf
that gives some information about the location of the assert.
It is not that much more helpful than a printf with a condition.
What is useful is that they are disabled by default. So they
can be sprinkle around and only turned on during debugging.
Adding shader name inside the assert report is not trivial and
could be added later (the shader name is only known at compile
time which is too late for string parsing).
Adding which drawcall produced the assert isn't trivial either.
It would require flushing the printf buffer for each drawcall
which might force synchronization and remove bugs.
Pull Request: https://projects.blender.org/blender/blender/pulls/129728
When opening the asset shelf brush selector popup in paint modes, clicking on a
catalog on the left wouldn't refresh the popup properly. Two catalog items
would be drawn as active, and the active catalog change wouldn't be reflected.
Only some mouse movements would trigger an update eventually.
Do copy asset data when copying an ID into the PartialWriteContext.
Currently there does not seem to be any use-case where this would not be
the desired behavior. This can be made an optional behavior in the
future if needed.
The NodeDeclarationBuilder::typeinfo_ is unused in release builds, but is
used in debug builds for assert.
Mark it as `[[maybe_unused]]` to silence strict compilation warning.
Pull Request: https://projects.blender.org/blender/blender/pulls/129912
This lead to infinitely small return values from
`paint_space_stroke_spacing` (since the size can become so small) which
in turn causes an infinite loop in `paint_space_stroke`.
Was considering clamping to some other measure (e.g. based on bounding
box factors), but these might not work well in all circumstances
(dyntopo on a terrain-size mesh might still need tiny spacing), so
settled to clamp to the minimal numerical value.
Pull Request: https://projects.blender.org/blender/blender/pulls/129908
This was caused by `drw_ResourceID` taking one vertex input
(at slot 15) which was then also used by material shaders.
Starting material shaders at 14 in this case avoid the overlap.
Note that this reduces the amount of supported attribute when
using the workarounds by one.