Age | Commit message (Collapse) | Author |
|
Instancing with geometry nodes uses just the evaluated Mesh, and ignores the
Object that it came from. That meant that it would try to look up the subsurf
modifier on the instancer object which does not have the subsurf modifier.
Instead of storing a session UUID and looking up the modifier data, store a
point to the subsurf modifier runtime data. Unlike the modifier data, this
runtime data is preserved across depsgraph CoW. It must be for the subdiv
descriptor contained in it to stay valid along with the draw cache.
As a bonus, this moves various Mesh_Runtime variables into the subsurf runtime
data, reducing memory usage for meshes not using subdivision surfaces.
Also fixes T98693, issues with subdivision level >= 8 due to integer overflow.
Differential Revision: https://developer.blender.org/D15184
|
|
The BMesh case was missing when extracting the loose edges flags used for
display, so the code was crashing on unitialized `MEdge` pointer.
|
|
Found via codespell -q 3 -S ./intern,./extern -L ans,ba,bording,datas,eiter,fiter,hist,inout,lod,ot,parm,parms,pixelx,pres,te
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D15155
|
|
The normals flags were not setup properly which made normals for all
elements (vertices, faces) to be drawn when using the normals overlay.
Also remove usage of uints for the flag in the APIs.
|
|
|
|
|
|
|
|
|
|
|
|
This patch adds support for PBVH drawing in EEVEE.
Notes:
# PBVH_FACES only. For Multires we'll need an API to get/cache attributes. DynTopo support will be merged in later with sculpt-dev's DynTopo implementation.
# Supports vertex color and UV attributes only; other types can be added fairly easily though.
# Workbench only sends the active vertex color and UV layers to the GPU.
# Added a new draw engine API method, DRW_cdlayer_attr_aliases_add. Please review.
# The vertex format object is now stored in the pbvh.
Reviewed By: Clément Foucault & Brecht Van Lommel & Jeroen Bakker
Differential Revision: https://developer.blender.org/D13897
Ref D13897
|
|
See {rBb69aad60bda23a53482b2c2ae98715c23a715bc8}
for more details.
|
|
|
|
|
|
# Conflicts:
# source/blender/draw/engines/eevee/shaders/volumetric_vert.glsl
|
|
This bug was unreported. This was triggering a linking error caused by
the vertex shader not having a local version of `attr_load_temperature_post`
and `attr_load_color_post`.
|
|
This was caused by the `copy_m4_m4` trying to copy the `object_to_texture`
from `drw_grid` which was `nullptr`.
Fixing this also exposed that rendering such volumes (without any valid
grid attributes) is not supported and we should follow what Cycles does.
Differential Revision: https://developer.blender.org/D15147
|
|
Viewport drawing does not support a per point radius attribute yet.
Instead, it has a fixed set of radius parameters that are used for all
curves in the same object. Now those radii are retrieved from the
radius attribute of the points on the first curve. This allows users
to control the radius of curves to some degree until proper per-point
radius is supported.
|
|
|
|
|
|
Good side effect of the change is that it makes it so that the
size of an array is more likely to be calculated at a compile time.
More ideally we'll be using bli::Array instead of the bare array,
but that is outside of the scope of this change.
|
|
|
|
This error was introduced in 176d7bcc2eb47b9820861037f90a7fb26de8c9a0
Fix provided by @deadpin
|
|
Also remove accidentally committed WIP commented code.
|
|
After this commit, all mesh data extraction and drawing code is in C++,
including headers, making it possible to use improved types for future
performance improvements and simplifications.
The only non-trivial changes are in `draw_cache_impl_mesh.cc`,
where use of certain features and macros in C necessitated larger
changes.
Differential Revision: https://developer.blender.org/D15088
|
|
|
|
|
|
Simple typo in rB55e3930b253e.
|
|
|
|
Instead of directly accessing constraint-specific callbacks
in code all over blender, introduce two wrappers to retrieve
and free the target list.
This incidentally revealed a place within the Collada exporter
in BCAnimationSampler.cpp that didn't clean up after retrieving
the targets, resulting in a small memory leak. Fixing this should
be the only functional change in this commit.
This was split off from D9732.
Differential Revision: https://developer.blender.org/D13844
|
|
This avoids reusing gpu shader files that have different requirements.
|
|
This is needed to avoid potential naming collision with other engines.
|
|
This is needed to avoid potential naming collision with other engines
|
|
Also fix formating of `curves_attribute_element_id` which was copy pasted.
# Conflicts:
# source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl
|
|
|
|
|
|
|
|
- CustomDataType -> eCustomDataType
- CustomDataMask -> eCustomDataMask
- AttributeDomain -> eAttrDomain
- NamedAttributeUsage -> eNamedAttrUsage
|
|
|
|
Although reusing the same patch coordinate for all corner pointing the
same vertex works for interpolation vertices, it does work for
interpolation face varying attributes. So we need to keep the original
patch coordinates around for face varying interpolation. This was caused
by the previous fix (a5dcae0c641604c033f852e41841f58460c40069).
|
|
|
|
Also cleaned up the code a tad bit. Note that I
found two more bugs:
* GPU subdivision attribute interpolation
is producing visual artifacts.
* "Show on cage" mode for subdivision surface
just shows black colors.
|
|
|
|
Issues stems from the mesh not being watertight. This was caused by
floating point precision issues when evaluating patch coordinates at
patch boundaries (loops/corners in different patches pointing to the same
vertex). To fix this we ensure that all loops pointing to the same vertex
share the same patch coordinate. This keeps code simple, and does not
require to track precision issues in floating point math all over the
place.
|
|
|
|
Mostly duplicate includes, also use nullptr, and using default
member initializers.
|
|
|
|
Contributed by luzpaz
Differential Revision: https://developer.blender.org/D15057
|
|
|
|
Contrary to coarse extraction, GPU extraction uses the same buffer for
the coarse data, only the final GPU buffer needs to be offset.
|
|
The face dots normals may not be always requested, thus leading to a
crash by null pointer dereference.
|