The Keying node produces different mattes between the GPU and CPU
evaluators.
That's because the CPU implementation doesn't use the full argmax to
determine indices, rather, it only considers the first argmax and uses
the minimum and maximum of the other two as a form of determinism or
stability.
The algorithm seems arbitrary and makes little sense to me, so for now,
the CPU implementation was ported for consistent results.
When an offline render was done side by side render preview, further
render preview updates requiring BVH to be rebuilt would trigger a
crash.
This will be fixed upstream the same way in Embree 4.2.
Pull Request: https://projects.blender.org/blender/blender/pulls/109966
Adds the UI for layer opacity in the layer panel.
Currently layer blending rendering is not implemented, so the last layer's opacity will affect all of the layers.
Pull Request: https://projects.blender.org/blender/blender/pulls/110177
The edited mesh is not occluded even with Xray alpha 1.0, but it still
occludes other meshes that are not in edit mode.
Therefore, to resolve, alpha is still considered in general occlusion,
but is ignored in occlusion of edited meshes.
The maximum OpenGL versions supported on mac
doesn't meet the minimum required version (>=4.3) anymore.
This removes all the OpenGL paths in GHOST
Cocoa backend and from the drop down menu in
the user preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/110185
This patch implements the Classic Kuwahara node for the Realtime Compositor.
A naive O(radius^2) implementation is used for radii up to 5 pixels, and a
constant O(1) implementation based on summed area tables is used for higher
radii at the cost of building and storing the tables.
This is different from the CPU implementation in that it computes the variance
as the average of the variance of each of the individual channels. This is done
to avoid computing yet another SAT table for luminance. The CPU implementation
will be adapted to match this in a future commit.
The SAT implementation is based on the algorithm described in:
Nehab, Diego, et al. "GPU-efficient recursive filtering and summed-area tables."
Additionally, the Result class now allows full precision texture allocation, which
was necessary for storing the SAT tables.
Pull Request: https://projects.blender.org/blender/blender/pulls/109292
The Switch View node crashes on editing the compositor node tree with
the GPU compositor enabled.
That's because interactive edits are are in contexts that are not
multi-view, which is indicated by an empty view name.
To fix this, we fallback to the first input for non multi-view contexts.
This PR adds diffuse light from environment to the scene without having an
irradiance volume in the scene.
It does this by extracting the sperical harmonics from the world probe and
store it in the irradiance brick that is reserved for world diffuse light
in the irradiance cache.
This also fixes that selecting an LookDev HDRI didn't update the diffuse
light.
**Known Issues**
- When sampling probes with lower resolution strokes are visible, leading
to flickering and instability in the spherical harmonics. This is an
issue that should be solved in a separate patch as it is already visible
in main
- When selecting a lookdev HDRI all irradiance volumes needs to be disabled
manually for the expected results (but this also disabled GI). In the future
this will be done automatically or we will add a solution to separate the
world diffuse light from the irradiance cache so we can update it on the fly.
Pull Request: https://projects.blender.org/blender/blender/pulls/110110
This change replaces a bare RenderEngine owned by a viewport
with a VeiwRender. This unlocks a possibility of accessing
RenderResult for viewport renders. Currently it is not done,
but it will be needed for an upcoming work towards unification
of the render passes handling.
Ref #108618
Pull Request: https://projects.blender.org/blender/blender/pulls/110244
Currently no functional changes.
Preparing for introduction of a Render structure for the viewport
render which will hold both engine and the render result for
passes access.
Use proper allocation and destruction for it.
Since the allocation is no longer zero-initialized make sure the
fields are explicitly zeroed out. This also allows to use an easier
way to initialize mutexes.
Currently no functional changes, preparing for a bigger refactor.
Used for the global list of the Render structures.
Using C++ container helps moving towards reliable "real" C++
structure for the Render, without worrying about the offset of
the next/prev fields.
Should be no functional changes on the user side.
Correct error in own fix [0] popovers (F9-redo) were handled the same
as popup menus. `F4,P` wasn't opening the preferences as it used to.
Resolve by checking if the parent was a menu.
[0]: c3bf00cd2d
The world light direction in the irradiance cache was inverted due
to misunderstanding of a code review comment. This PR fixes this
so the captured light from a direction is stored in the SH correctly.
Pull Request: https://projects.blender.org/blender/blender/pulls/110258
Enum popups don't set an active button so accelerator keys didn't work.
Always use accelerator keys in popups because these are typically
launched from non-menus (the redo popup for e.g.) where it doesn't
make sense to pass the event to the parent.
Shader write must be correctly specified where required for
shaders which perform direct image and buffer writing operations.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/110219
The Realtime GPU compositor crashes when muting output or viewer nodes.
This happens because output nodes are scheduled regardless of their
muted statued, however, the initial reference count takes the muted
status into account, resulting in a use after free error, hence the
crash.
To fix this, we simply do not schedule muted output nodes.
"Flip" option in mirror modifier is only effective for when "Bisect" is
enabled, thus grey out the flip option when it's ineffective to avoid
confusion on the user interface.
Pull Request: https://projects.blender.org/blender/blender/pulls/110191
It is possible to organize shape keys into a tree through the
reference key setting. Mesh editing and sculpting a reference
key is supposed to update all its children, but this was only
done for one level of dependencies.
This changes the code to retrieve the complete set of dependent
keys and update them all.
Caused by fd3e44492e.
Images were drawn filling the entire window, now use available size/
offset inside the window and pass these as `rctf` to
`draw_display_buffer`.
Should be good for 3.6/3.3 LTS
Pull Request: https://projects.blender.org/blender/blender/pulls/110206
When scenes only have a world probe the world probe had several
artifacts.
- The first sample didn't update the world.
- When switching between viewports the world didn't get updates
- When rendering it ignored the resolution that was set by the user
The reason was that the ubo was only updated when the probes where
synced. This PR adds an exception to also update when there is only
the world probe.
Pull Request: https://projects.blender.org/blender/blender/pulls/110238
Implementation of the smoothing operator for grease pencil strokes.
Works on `CurvesGeometry` position and other attributes, such as radius.
Based on the gaussian blur like algorithm in `BKE_gpencil_stroke_smooth_point` by Henrik Dick.
Pull Request: https://projects.blender.org/blender/blender/pulls/109635
This is a fairly verbose part of nodes RNA, which defines the base
NodeSocket and NodeSocketInterface types as well as all the subtypes
required for showing correct properties based on socket type.
The RNA for this part of nodes is quite self-contained, so moving it
to a separate files works well and reduces the overall size of
rna_nodetree.cc considerably (~1700 LoC). This does not include any
functional changes.
Moving this to a separate file will make it easier to improve the node
group interface (#109135).
Pull Request: https://projects.blender.org/blender/blender/pulls/110220