This was caused by float imprecision in the NDF computation when
alpha was very close to 0. The alpha clamping threshold for the
eval function needs to be higher than the one for the sampling
function.
Fix#118997
With two viewports, and one viewport with overlays turned off, one viewport
first requests positions without calculating loose geometry, then the second
viewport can request the loose geometry index buffer. In that case the
previously-calculated positions VBO has the wrong size.
To fix this, always calculate loose geometry when the positions are requested.
That's required because we no simple way of checking whether the previously
uploaded positions included loose geometry. That was the state before recent
refactors in this area anyway.
This makes it clear that the optimization to not calculate loose geometry is
meaningless, because the positions buffer will always be requested at some
point when drawing a mesh.
This fixes a number of issue with the pixel radius calculation.
- Fix factor of 2 being in the wrong place.
- `narrowing` is removed as this is not what we want
to compute (see comment).
- The `lod_min` is not the actual minimum LOD. Clamp by
both `clipmap_lod_min` and `clipmap_lod_max`.
Part of #116901.
This file contains the creation of four different UV edit index buffers:
triangles, lines, points, and face dots. The main changes are about making
it clearer when faces are skipped. Other than that, changes are faily
extensive but straightfoward. In a few places some parts of existing
loops have been split out and parallelized, but the bulk of the work for
each IBO remains largely single threaded.
Part of #116901.
Includes a general standardization of the code, removing constant
checks from hot loops, standardizing naming, tweaking BMesh face
iteration. And includes parallelization too.
Part of #116901.
To avoid resizing the buffer, the data is added to a temporary vector
first. That should be fine because the number of roots is expected to
be quite small compared to the size of the mesh.
Part of #116901.
The algorithm is very complicated to I didn't adjust it. The changes are just
removing the data struct and un-sharing some code to make things a bit
simpler. I also changed the loop to iterate over faces rather than triangles
to avoid the reverse triangle to face lookup. This removes the need to
create the `corner_tri_faces` map, saving 4 bytes per triangle.
Part of #116901.
A straightfoward change this time; the algorithm wasn't adjusted,
it was just put inside of a single loop. I did change some nested if
statements to continue statements to reduce indentation though.
Part of #116901.
The BMesh version of the algorithm was parallelized because BMesh has
edge to face topology lookup available.
This also allows removing `GPU_vertbuf_steal_data`, by just generating
the correct data type in the first place. Removing that should help dealing
with improvements to VBO data ownership in the future.
Part of #116901.
For meshes, extract vertex group weights to a temporary vertex-sized
array, then gather them to the final VBO array. This reduces duplicate
work, and eventually the gather step could be done on the GPU too.
Part of #116901.
Most of these loops were extremely simple, so function call overhead
would have been problematic in the existing code. However, they're
also so simple that they're most likely memory bound, so I wouldn't
expect a large performance change.
The `nor` vertex buffer wasn't large enough for the indices in the lines
index buffer. This is undefined behavior at best AFAIK. On some drivers
it caused crashes when there was only loose geometry.
This commit makes the VBO large enough for all indices, filling the loose
geometry normals with (0,0,0,0), which the overlay wireframe shader
already checks for.
Pull Request: https://projects.blender.org/blender/blender/pulls/122720
This handles the transition to EEVEE-Next (now EEVEE).
This removes some things that make no sense to keep
even for compatibility.
- Scene.eevee.light_cache_data
- Scene Light cache operators
- Scene Light cache RNA properties
The remaining legacy properties will be removed later
on to avoid python API breakage.
We keep the identifier of EEVEE-Next as `BLENDER_EEVEE_NEXT`
to avoid addons being incorrectly silently made compatible
with the EEVEE-Next where the Python API is different.
This renaming should be done in 5.0 release.
Thank you EEVEE-Legacy, you served us well.
Pull Request: https://projects.blender.org/blender/blender/pulls/122433
The issue would happened in any situation where the light
moves (update, animation, jitter) or have a lot of LOD
tagged by moving casters. In these cases, the actual
effective LOD min is bigger than the one from the UI which
results in shadow acnee artifacts (because the computed bias
is too small).
This patch saves the effective min LOD per tilemaps and
amend the `light.lod_min` to replace it by the min of
all tilemaps in used by one light.
Fix for #122285
`Viewport Render Image` feature uses full parameters of the 3D view
to capture the scene.
Rendering `camera view` is a special case: viewport zoom/pan
parameters should be ignored in order to match render.
Pull Request: https://projects.blender.org/blender/blender/pulls/122467
This fixes an issue reported when launching Blender with
`--debug-gpu`. The newly added "thick wires" feature for
bone shapes caused that problem.
The issue was that the shader definitions used
the depth tex as a sampler and at the same time wrote to it.
The fix is to remove the code that uses the depth texture.
This is just the simplest solution for now, and it doesn't change
the visual appearance of the bone shapes.
------
Note: the code I copied from was `overlay_edit_mesh_frag.glsl`.
So I assume the depth sampler is needed, but the pipeline
for bone shapes isn't set up to handle that.
Pull Request: https://projects.blender.org/blender/blender/pulls/122558
- Add a report to explain why allocation fails and display
the current limit.
- Add heuristic to avoid out of memory issue.
- Remove the delay property that did not do anything
right now.
- Reduce default clip end by half.
Fix#121916
Pull Request: https://projects.blender.org/blender/blender/pulls/122572