Age | Commit message (Collapse) | Author |
|
|
|
Resizing was not resizing the `data_` buffer. Also use `power_of_2_max_u`.
|
|
This could have produce errors especially in the iterators.
|
|
This is to avoid hiding resize inside the `[]` operator.
|
|
We do not need `_ex` suffix.
|
|
|
|
The problem is that depsgraph evaluation happens before the OpenGL context
is initialized, and so modifier evaluation happens without GPU subdivision.
Later the BKE_subsurf_modifier_can_do_gpu_subdiv test in the draw code gives
a different result.
This just checks if the mesh has information for GPU subdivision in the draw
code, and if so uses it. This is only set if the test for supported GPU
subdivision passes in the modifier evaluation.
Additionally it may be good to perform OpenGL context initialization earlier
so background render can take advantage of GPU subdivision, but this is more
complicated.
Differential Revision: https://developer.blender.org/D14969
|
|
|
|
This buffer resizes on access.
|
|
The template also takes the length of the chain to allow triple buffering.
|
|
|
|
|
|
|
|
This is often needed and somehow cumbersome to set up. This will allow some
code simplifications.
|
|
|
|
Similar to cf69652618fefcd22b2cde9a2.
|
|
Knowing when layers are retrieved for write access will be essential
when adding proper copy-on-write support. This commit makes that
clearer by adding `const` where the retrieved data is not modified.
Ref T95842
|
|
|
|
When extracting UV point indices, only the vertex points coming from the
original geometry should be drawn. For this, the routines (for subdivision
and coarse meshes) would only consider a vertex to be real if the extraction
type is `MAPPED`, and that an origin index layer on the vertices exist
with a valid origin index for the current vertex.
However, if the extraction type is `MESH`, which can happen with for
example an empty Geometry Node modifier, or with deferred subdivision,
this would consider every vertex to not be "real" and therefore hidden from
the UV editor.
This reworks the condition for "realness" to also consider a vertex to be
real if there is no origin layer on the vertices. The check on the extraction
type is removed as it becomes redundant.
This only modifies the check in the UV data extraction for point indices,
however similar checks exist throughout the extraction code, these will
be dealt with separately in master.
Differential Revision: https://developer.blender.org/D14773
|
|
Also add missing task-ID reference & remove colon after \note as it
doesn't render properly in doxygen.
|
|
Caused by rBe4bb898e40ee
|
|
|
|
|
|
|
|
Geometry nodes can generate color attributes that aren't on point or corner domain.
When not found in these domains it will be processed as a common attribute.
|
|
|
|
Sculpt colors tagged the custom data as already created (cd_used), but
should have been tagged as being requested (cd_needed).
|
|
Use num & count (for counters), in drawing code, see: T85728.
|
|
Replace tot/amount & size with num, in keeping with T85728.
|
|
Follow conventions from T85728.
|
|
The acquire locking of the draw manager introduced other issues.
The current implementation was a hacky solution as we know that the
final solution is something totally different {T98016}.
Related issues:
* {T97988}
* {T97600}
|
|
The acquire locking of the draw manager introduced other issues.
The current implementation was a hacky solution as we know that the
final solution is something totally different {T98016}.
Related issues:
* {T97988}
* {T97600}
|
|
Write to arrays directly instead of using the "step" utility.
|
|
Those settings are intended to be removed at some point, but for now they
are still needed because the radius attribute isn't supported.
|
|
The mesh drawing code used a different mesh to check whether or not to
draw face dots and to actually retrieve them. The fix is moving the
responsibility of determining whether to use subsurf face dots to the
creation of `MeshRenderData` where the mesh used for drawing is
known, rather than doing it at a higher level.
Differential Revision: https://developer.blender.org/D14855
|
|
The mesh drawing code used a different mesh to check whether or not to
draw face dots and to actually retrieve them. The fix is moving the
responsibility of determining whether to use subsurf face dots to the
creation of `MeshRenderData` where the mesh used for drawing is
known, rather than doing it at a higher level.
Differential Revision: https://developer.blender.org/D14855
|
|
|
|
When resizing a viewport all engine instance data was cleared.
This wasn't the intended design and lead to performance regressions
in the image engine.
This patch makes sure that the instance data isn't cleared when
the viewport size changes. When using instance data, draw engines
are responsible to update the textures accordingly.
This could also reduce flickering/stalling when resizing the viewport
in eevee-next.
Fixes T95428.
Reviewed By: fclem
Maniphest Tasks: T95428
Differential Revision: https://developer.blender.org/D14874
|
|
|
|
|
|
Introduced by rBadbe71c3faba.
|
|
|
|
Recently `gpu_shader_3D_smooth_color_frag.glsl` had the uniform declarations removed.
For shaders without `ShaderCreateInfo` that require this source this results in the error:
```
ERROR (gpu.shader): hair_refine_shader_transform_feedback_workaround_create FragShader:
|
54 | fragColor = finalColor;
|
| gpu_shader_3D_smooth_color_frag.glsl:5:0: Error: Use of undeclared identifier 'fragColor'
| gpu_shader_3D_smooth_color_frag.glsl:5:0: Error: Use of undeclared identifier 'finalColor'
|
55 | fragColor = blender_srgb_to_framebuffer_space(fragColor);
|
| gpu_shader_3D_smooth_color_frag.glsl:6:0: Error: Use of undeclared identifier 'fragColor'
| gpu_shader_3D_smooth_color_frag.glsl:6:0: Error: Use of undeclared identifier 'fragColor'
```
So port that shader to use `ShaderCreateInfo`.
|
|
The coarse polygon count was set to the one of the BMesh instead of
the the one of the mesh used for subdivision, which caused the
compute shaders to output wrong data.
|
|
|
|
Overwriting UV map or vertex color data in Geometry nodes will move the
layers to another CustomData channel, and as such, will make attribute
lookup fail from the UVMap and Vertex Color nodes in EEVEE as the
CustomDataType will also be modified (i.e. no longer `CD_MTFACE` or
`CD_MCOL`).
As discussed in T93179, the solution is to use `CD_PROP_AUTO_FROM_NAME`
so that the render engine is able to find the attributes. This also makes
EEVEE emulate Cycles behaviour in this regard. `attr_load_uv` and
`attr_load_color` are also removed in favor of the generic attribute
API in the various GLSL shaders.
Although `CD_PROP_AUTO_FROM_NAME` is now used even for UV maps, the
active UV map is still used in case the attribute name is empty, to
preserve the old behavior.
Differential Revision: https://developer.blender.org/D13730
|
|
The crash is caused as the data for the UV editor is requested before
the data for the mesh as a separate draw update. Since building the UV
stretch angle buffer requires the position buffer, the latter is not
created yet in this case.
To fix this, create a local position buffer from the subdivision data. An
alternate fix was considered to remove the dependency on the position
buffer by interpolating on the GPU the coarse stretch angle buffer but
this did work. Maybe this will be revisited.
|
|
This commit introduce back support for all geometry types and all nodetree support.
Only the forward shading pipeline is implemented for now.
Vertex Displacement is automatically enabled for now.
Lighting & Shading is placeholder.
Related Task: T93220
# Conflicts:
# source/blender/draw/engines/eevee_next/eevee_engine.cc
# source/blender/gpu/CMakeLists.txt
|
|
This had only one use and it was for debugging. Remove the shader for now.
This also simplifies the debug drawing even if slower.
|
|
Some old compiler do not like this character even if inside an `#error`
directive.
|