Based on the paper "Practical Hash-based Owen Scrambling" by Brent Burley,
2020, Journal of Computer Graphics Techniques.
It is distinct from the existing Sobol sampler in two important ways:
* It is Owen scrambled, which gives it a much better convergence rate in many
situations.
* It uses padding for higher dimensions, rather than using higher Sobol
dimensions directly. In practice this is advantagous because high-dimensional
Sobol sequences have holes in their sampling patterns that don't resolve
until an unreasonable number of samples are taken. (See Burley's paper for
details.)
The pattern reduces noise in some benchmark scenes, however it is also slower,
particularly on the CPU. So for now Progressive Multi-Jittered sampling remains
the default.
Differential Revision: https://developer.blender.org/D15679
As mentioned in T89399, "the source of this bug is that cursor wrap
moves the cursor, but when it later checks the mouse position it hasn't
yet been updated, so it re-wraps".
As far as I could see, this happens for two reasons:
1. During the first warp, there are already other mousemove events in the queue with an outdated position.
2. Sometimes Windows occasionally and inexplicably ignores `SetCursorPos()` or `SendInput()` events. (See [1])
The solution consists in checking if the cursor is inside the bounds right after wrapping.
If it's not inside, it indicates that the wrapping either didn't work or the event is out of date.
In these cases do not change the "accum" values.
1. f317d619cc/src/video/windows/SDL_windowsmouse.c (L255))
Maniphest Tasks: T89399
Differential Revision: https://developer.blender.org/D15707
The realtime compositor crashes when some nodes are unlinked.
This happens for GPU material nodes if it was compiled into its own
shader operation. Since it is unlinked, the shader operation will have
no inputs, a case that the current code didn't consider.
This patch fixes this by skipping code generation for inputs if no
inputs exist for the shader operation.
- Use upper-case for defines.
- Use u-prefix for unsigned types.
- Use snake case for struct members.
- Use const struct for unicode_blocks & arguments.
- Use doxy style comments for struct members.
- Add doxy sections for recently added code.
- Correct code-comments (outdated references).
- Remove 'e' prefix from struct UnicodeBlock/FaceDetails
(normally used for enums).
Use `inline constexpr` instead of `static constexpr` to prevent these
variables from being duplicated in each translation unit that includes
the BLI_any.hh header.
Differential Revision: https://developer.blender.org/D15698
Change `cd_loop_uv_offset` from signed to unsigned, forcing
a crash if passed invalid input.
Differential Revision: https://developer.blender.org/D15722
This function never succeeded as an off by one error checking the last
character always indexed the null byte.
The 'for' loop was broken as of [0] since the unsigned number could wrap
around with some RNA paths causing out of bounds memory access.
This is an example where tests would have caught the problem early on,
RNA path tests are planned as part of D15558.
[0]: 11b4d0a3c3
Gamma correction for glyph coverage values.
See D13376 for details and examples.
Differential Revision: https://developer.blender.org/D13376
Reviewed by Julian Eisel
- Turn storage into an object with "automatic" memory management (RAII)
so freeing is implicit and reliable.
- Turn functions into member functions, to have the data and its
functions close together with controlled access that increases
encapsulation and hiding implementation details.
- Use references to indicate null is not an expected value.
- Related minor cleanup (comments, use const etc.)
Couldn't spot any changes in performance.
This way you can benchmark the tree rebuilding by simply commenting out
a single line. Not that it was difficult before, but this makes it as
easy as it gets, with basically no knowledge of existing benchmarking
tools required.
Simplifies code quite a bit, since this was doing the typical work of
such a container. I may remove this vector entirely as I'm working on
performance fixes, not sure, but simplifying this helps reason about the
design.
Couldn't spot performance differences in some benchmarks, and I wouldn't
expect any. Maybe some minor onces thanks to the small buffer
optimization of `blender::Vector`.
- Use C++ nullptr instead of C's NULL (clang-tidy warns otherwise)
- Use early exit/continue to avoid indentation (helps readability
because visual scope of no-op branches is minimized).
- Use const for local variables, to separate them clearly from the
mutable ones.
- Avoid struct typedef, this is not needed in C++
This gave a 1.1x speedup, however also leads to very long compile times
that make it seems like Blender has stopped working.
This can be brought back in the future behind an option that users can
explicitly enabled.
Fix T100102
Ref D14923, D14763, T92212
We only need to 'manually' remap RNA ID pointer property to the newly
created override if the owner itself was not already a local override.
Also some more minor tweaks to notifiers sent when creating the
override.
This patch implements the bilateral blur node for the realtime compositor.
Differential Revision: https://developer.blender.org/D15674
Reviewed By: Clement Foucault
This patch implements the despeckle node for the realtime compositor.
Differential Revision: https://developer.blender.org/D15673
Reviewed By: Clement Foucault
This operator converts any stroke of gpencil with a center line into a stroke with the perimeter.
It's possible to assign the active material, keep current or create a new material for all perimeters.
The conversion is only done for strokes with a material using `Stroke`. Only `Fill` strokes are not converted.
Known issues: As the perimter has not boolean implementation, some perimeters can be overlaped. This could be solved in the future when a new 2D boolean library will be developed.
Reviewed By: mendio, pepeland, frogstomp
Differential Revision: https://developer.blender.org/D15664