Some vulkan platforms don't support 24bit depth components. In this
case we will allocate float depth component. During readback the data
should be converted back to what is expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/108698
During uv unwrapping and uv packing, certain floating point algorithms
have extreme sensitivity to round-off errors. These can produce very
different layouts even when given inputs which are only slightly different.
The root cause is that the two main types of CPUs used to run Blender,
namely x86 and Apple Silicon, produce slightly different results on some
math functions, including `sinf()`, `cosf()` and `atan2f()`.
* sinf(0.8960554599761962890625) = 0.780868828296661376953125 (Intel i7)
* sinf(0.8960554599761962890625) = 0.78086888790130615234375 (Apple M1)
This fix, and others that came before it [0], improve accuracy by using
double-precision to hide the differences between the CPUs.
[0] e.g. 0eba9e41bf
[1] See also #107829
In `transdata_get_time_shuffle_offset_side`, the tolerance for
terminating the loop is too tight, sometimes it will lead to a infinite
loop due to non-integral start/end values. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/108257
When opening 'homefile' (i.e. startup or factory startup) at Blender
start (i.e. when there is no existing WM yet), the size of the windows
in the newly read WM is reset to zero, which will then cause `WM_check`
to re-size them the the maximum possible size on current monitor.
Regression from ebb5643e59.
Caused by 98bfa8d458
Occlusion must consider several factors:
- The `Viewport Display` > `Display As` setting of the object.
- The X-Ray mode of the scene.
- Whether only Snap to Face is being used.
- Whether Snap is set to Cage (always transparent) in edit mode.
- Whether the object is hidden.
In the case of Cage, the final geometry should be utilized for occlusion.
However, to prevent excessive and risky modifications, it was followed
the same approach as before and verified the `Display As` setting of
the object.
This includes square root and reciprocal, and their safe versions.
For the reciprocal use name rcp, which matches Cycles and allows
to implement the same function for per-element operation on matrices.
Pull Request: https://projects.blender.org/blender/blender/pulls/108705
In particular, the root was not sticking to mesh with hair dynamics.
Reason for this is missing HairKey weight upon conversion (everything
had zero weight). This then can not be corrected (since weight tool does
not allow to paint on roots).
So now, give the hair a default 1.0 to 0.0 weight gradient upon
conversion [which is in line with the default weight distribution for a
hair particle system].
Pull Request: https://projects.blender.org/blender/blender/pulls/108651
This patch implements the Movie Distortion node for the realtime
compositor. The distorted coordinates are computed and cached for a
particular tracking camera distortion parameters. So for expensive
distortion models, the first run will take some time to compute, but
subsequent runs will be fast.
An alternative implementation would be to implement each of the
distortion modes in the shader, but that was decided against for a few
reasons:
1. We want to hide the implementation details of the distortion models,
since it is provided through an external library (Libmv).
2. Some distortion models are expensive to solve accurately, and can be
quite slow to solve each time the shader runs.
3. The typical usage of the node does not involve interactive editing of
the distortion parameters, rather, the parameters are computed during
camera calibration, so caching seems most fitting in that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/108230
* Enable "Experimental Compositors" in preferences, then choose
Realtime GPU execution mode in node editor sidebar.
* Only supports combined pass input and Render Result combined output.
* No viewer nodes, no file output nodes, and no node previews yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/108629
* Provide render data, node tree and color management directly instead
of going through scene, as these may be modified by the render pipeline.
Also better for cached texture hits this way.
* Change legacy pass type to pass name.
* Skip file output node when not doing final render.
* Gracefully handle incomplete render results.
Pull Request: https://projects.blender.org/blender/blender/pulls/108629
In a recent commit the MultiGGX code was changed, and along with it
the tool tip for MutliGGX. This commit fixes the issue where the
tooltip was not updated for the MultiGGX option in the Principled BSDF.
Pull Request: https://projects.blender.org/blender/blender/pulls/108589
Part of the checks to see if translating a UI string is allowed or not
is that current thread is the main one. This was a requirement years ago
of the Boost backend for translations.
Not sure whether this can be removed or not now, but it needs to be
carefully checked, done it as its own commit, and not in a beta release
branch. ;)
Sorry for the noise, totally missed this during the patch review
yesterday.
Pasting numerical array buttons happens with `Ctrl + Alt + V`.
Holding `Alt` also triggers uiSelectContext, so having other nodes/
objects etc. selected while doing this would try to copy the pasted
values back to other objects (possibly to the ones you pasted from) and
that happens relative to the original value, so the value actually
changes.
NOTE: the `Ctrl + Alt + V` shortcut can also be used on non-array buttons, so was an issue for them as well.
To prevent the "copy-to-selected" behavior, refine the `IS_ALLSELECT_EVENT` macro to be more specific.
Pull Request: https://projects.blender.org/blender/blender/pulls/108270
Double underscores didn't communicate that this was deprecated,
and are typically for internal or platform defined identifiers and
shouldn't be used for public API's.
This PR adds conversion template to convert between Low Precision float
formats. These include Binary32 floats and lower. It also adds support
to convert between unsigned and signed float formats and float formats
with different mantissa and exponents.
Additionally overflows (values that don't fit in the target float
format) will be clamped to the maximum value.
**Reasoning**:
Up to now the Vulkan backend only supported float and half float
formats, but to support workbench, 11 and 10 unsigned floats have to be
supported as well. The available libraries that support those float
formats targets scientific applications. Where the final code couldn't
be optimized that well by the compiler.
Data conversion for color pixels have different requirements about
clamping and sign, what could eliminate some clamping code in other
areas in Blender as well. Also could fix some undesired overflow when
using pixels with high intensity that didn't fit in the texture format
leading to known artifects in Eevee and slow-down in the image editor.
**Future**
In the future we might want to move this to the public part of the GPU
module so we can use this as well in other areas (Metal backend), Imbuf clamping
See 3c658d2c2e69e9cf97dfaa7a3c164262aefb9e76 for a commit that uses
this and improves image editor massively as it doesn't need to reiterate over
the image buffer to clamp the values into a known range.
Pull Request: https://projects.blender.org/blender/blender/pulls/108168
Backgrounds in Eevee-next were different compared to Eevee-legacy.
Only when viewed from the world origin the background matched.
This change will make sure that the results of both engines matches.
Pull Request: https://projects.blender.org/blender/blender/pulls/108509
Now the operator is used for both the internal & external editor,
so there is no need for the caller to call this operator only when
the preferences are set.
Calling screen maximize while dragging could lead to UI layout change
which affects context, this lead to crashes in the icon drawing and
selection code. This patch prevents maximize operator from running if
dragging is in progress.
Might need to look into why `drag->imb->rect` is None immediately after
calling maximize, we might want it to work since it's sometimes
more convenient to drag then put into a big recieving box. But since
`wmDropBox` is predetermined, this can be a somewhat problematic.
Pull Request: https://projects.blender.org/blender/blender/pulls/107803
Add a user preference to set up a custom text editor for editing text
files with the "Edit Source" action in the UI context menu.
- An operator TEXT_OT_jump_to_file_at_point has been added.
- A custom editor can be set in the user preferences.
- A preset has been included for "Visual Studio Code".
- When the editor is not set, use Blender's internal editor.
Ref !108299.