Age | Commit message (Collapse) | Author |
|
This was caused by the ViewLayer being freed with all its
engine data.
|
|
|
|
In Blender 2.90 EEVEE materials were refactored that introduced crashes on Intel
GPUs on Windows. The crash happened in the `local_context_workaround` that temporary
stored compiled materials in a binary form to reload it in the main GL context.
It has been tested that the workaround isn't needed anymore for HD6xx GPUs, but it
is still needed for HD4000.
After several unsuccesfull fixes we came to the conclusion that we could not support
the local context workaround and needed to come with a different workaround. The idea
of this patch is that in these cases there is only a single context that is used for
rendering. Threads that uses these contextes are guarded by a mutex and will block.
Impact on User Level:
* Due to main mutex lock the UI freezes when rendering or baking or feel less snappy
Reviewed By: Clément Foucault, Brecht van Lommel
Differential Revision: https://developer.blender.org/D8410
|
|
Some implementation have different maximum texture size.
This patch avoid crash when texture allocation fails when:
- trying to bake a lightcache too big for the OpenGL imeplementaion.
- loading a cache from file that is too big for the OpenGL imeplementation.
|
|
|
|
|
|
|
|
|
|
leads to crash
|
|
When bl_use_gpu_context is set, an OpenGL context will be available for
OpenGL based render engines.
Differential Revision: https://developer.blender.org/D8305
|
|
This also remove some non functionnal state changes that were left
from legacy code.
|
|
|
|
|
|
And move it to GPU module.
|
|
When using link duplicated objects it could happen that one object is
calculating the GPUBuffers and the second object is marking these
buffers invalid. This introduces threading issues.
This patch fixes this by combining the surface and surface per material
batches. Most likely the surface per material batches are used and when
requested you will most likely need the surface batch for the depth
tests and overlays.
During tests it slightly improves performance as batches aren't thrown
away without using it.
After this patch we can add a quick path for meshes with one material
and two materials.
Alternative approaches that have been checked:
- sync extraction per object: reduced performance to much (-15%)
({D8292})
- post checks: reduced the threading issues, but didn't solve it.
- separating preparation and execution of the extraction ({D8312})
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8329
|
|
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D8328
|
|
|
|
|
|
|
|
|
|
Also includes outline overlays. Removes the temp overlay drawing
We make the geometry follow camera like billboards this uses less
geometry. Currently we use half octahedron for now. Goal would be
to use icospheres.
This patch also optimize the case when pointcloud has uniform radius.
However we should premultiply the radius prop by the default radius
beforehand to avoid a multiplication on CPU.
Using geometry instead of pseudo raytraced spheres is more scalable as
we can render as low as 1 or 2 triangle to a full half sphere and can
integrate easily in the render pipeline using a low amount of code.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8301
|
|
Copied from eevee bsdf_common_lib.glsl
|
|
|
|
Some convenience function for using DRWShaderLibrary.
|
|
This will remove some code duplication between draw engines.
|
|
The vertex colors node was using the M_COL attribute type but Sculpt
Vertex Colors use CD_PROP_COLOR
Now the Vertex Color node also fallbacks to legacy vertex colors if
Scultp Vertex Colors are not enabled as experimental.
Reviewed By: brecht
Maniphest Tasks: T78369
Differential Revision: https://developer.blender.org/D8185
|
|
Sculpt vertex colors changed the `DRW_MeshCDMask` from 4 bytes to 8 bytes, but
the functions assumed it still was 4 bytes. This patch updates the functions and
adds a compile time check.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8215
|
|
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
|
|
Loop over faces and calculate their centers instead of zeroing the
face center array and accumulating all faces vertex corners.
Move subsurf face center extraction into it's own loop since it works
differently.
|
|
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8239
|
|
|
|
Similar track as for normal mesh. Don't store the tangent normals in CustomData
of the mesh, but in an unassociated CustomData instance.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8161
|
|
This was just a missing conversion.
|
|
Change extraction callbacks to take index ranges instead of calling them
for each mesh element (poly, loop, vert & edge).
This gives a minor overall performance gain in my tests, ~5% on average.
Details:
- Use typed parameter structs and macros for looping over elements.
Without this, changes to these callbacks is time consuming as changes
need to be made in many places.
- Avoid iterating over polygon-loops when iterating over polygons
is sufficient.
- Simplify logic to access adjacent loops for faster line extraction.
- Rename 'loop' iterators to 'poly' (as they take polygon ranges)
the iterator callbacks can operator on either polygon or loop data.
- Use term 'last' for the last index (inclusive),
use 'end' when this value (not inclusive).
|
|
|
|
This was missing in previous cleanup commits.
|
|
Forgot to free the tangent layer for bmesh in the drawing code.
|
|
|
|
Better readability and allows adding new struct members without
adding empty slots to every 'MeshExtract' struct.
|
|
|
|
|
|
Gives around ~5% speedup on high poly meshes.
|
|
To avoid this we just bypass culling if the object is too big to avoid
float precision issues.
|
|
This was caused by the override viewport size not being maintained after
DRW_cache_restart().
Also this fixes issue with the inv_size not being updated correctly.
|
|
Reviewers: fclem
Differential Revision: https://developer.blender.org/D8103
|
|
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.
This commit includes:
- SCULPT_UNDO_COLOR for undo support in sculpt mode
- SCULPT_UPDATE_COLOR and PBVH flags and rendering
- Sculpt Color API functions
- Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
- Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
- Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
- Remesher reprojection in the Voxel Remehser
- Paint Brush and Smear Brush with color smoothing in alt-smooth mode
- Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
- Color Filter
- Color picker (uses S shortcut, replaces smooth)
- Color selector in the top bar
Reviewed By: brecht
Maniphest Tasks: T72866
Differential Revision: https://developer.blender.org/D5975
|
|
Tangent normals were temporarily saved in the original given layers but
the typeinfo wasn't updated. This lead to several issues since we
changed the threading of the mesh extraction.
This patch stores the tangent normals in a temporary custom data on the
stack this way the typemap doesn't need to be updated.
Still need to run the tests for an hour to see if it is fixed
Reviewed By: Clément Foucault, Philipp Oeser
Differential Revision: https://developer.blender.org/D8095
|
|
This revisit the render pipeline to support time slicing for better motion
blur.
We support accumulation with or without the Post-process motion blur.
If using the post-process, we reuse last step next motion data to avoid
another scene reevaluation.
This also adds support for hair motion blur which is handled in a similar
way as mesh motion blur.
The total number of samples is distributed evenly accross all timesteps to
avoid sampling weighting issues. For this reason, the sample count is
(internally) rounded up to the next multiple of the step count.
Only FX Motion BLur: {F8632258}
FX Motion Blur + 4 time steps: {F8632260}
FX Motion Blur + 32 time steps: {F8632261}
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D8079
|
|
Regression in deaff945d0b9
|
|
This adds object motion blur vectors for EEVEE as well as better noise
reduction for it.
For TAA reprojection we just compute the motion vector on the fly based on
camera motion and depth buffer. This makes possible to store another motion
vector only for the blurring which is not useful for TAA history fetching.
Motion Data is saved per object & per geometry if using deformation blur.
We support deformation motion blur by saving previous VBO and modifying the
actual GPUBatch for the geometry to include theses VBOs.
We store Previous and Next frame motion in the same motion vector buffer
(RG for prev and BA for next). This makes non linear motion blur (like
rotating objects) less prone to outward/inward blur.
We also improve the motion blur post process to expand outside the objects
border. We use a tile base approach and the max size of the blur is set via
a new render setting.
We use a background reconstruction method that needs another setting
(Background Separation).
Sampling is done using a fixed 8 dithered samples per direction. The final
render samples will clear the noise like other stochastic effects.
One caveat is that hair particles are not yet supported. Support will
come in another patch.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7297
|