Age | Commit message (Collapse) | Author |
|
|
|
|
|
and texture mode.
|
|
|
|
|
|
Color banding issues can appear, as result of the 8 bitdepth RGBA that
is used in the viewport.
This change will use `GPU_RGBA16F` for final renderings and for drawing textures. This
allows displaying HDRI textures. Vertex Colors uses `GPU_RGBA16` to resolve
color banding issues. All other modes use `GPU_RGBA8` to reduce
bandwidth and gpu memory.
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5179
|
|
When drawing the selection buffer the camera images were drawn. This
resulted in unneeded extra clicking for the user. This change will
ignore camera images during the selection.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5276
|
|
|
|
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
|
|
|
|
Previous commit wasn't nearly covering all of them.
|
|
|
|
Basically the solution is to call `DRW_shgroup_call_sculpt` when `BKE_sculptsession_use_pbvh_draw(...)` is true.
Ref T67259
Reviewers: fclem, jbakker, brecht
Reviewed By: fclem, brecht
Maniphest Tasks: T67259
Differential Revision: https://developer.blender.org/D5396
|
|
|
|
|
|
|
|
Changing the global state would obviously cause issues for async
execution. This is the simplest solution for a simple problem.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D5413
|
|
Both eevee_materials.c and workbench_deferred.c include eeve_lut.h which has its arrays marked as static leading to the blue_noise array being embedded into our binary twice.
This change takes the arrays out of the header and properly marks them as const since they are lookup tables and should not be written to.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D5346
|
|
|
|
|
|
|
|
|
|
Avoids expensive context switches.
|
|
|
|
The right thing is to be occluded by the visible mesh (in the case with modifiers).
|
|
|
|
Due to current uses, this does not bring functional changes.
|
|
|
|
|
|
|
|
|
|
Blender session
The depth attachment of the framebuffer was missing.
|
|
T68035 by @luzpaz
|
|
|
|
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.
Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.
This replaces OPTYPE_USE_EVAL_DATA which is now removed.
Some general rules about usage of accessors:
- Drawing is expected to happen from a fully evaluated dependency graph.
There is now a function to access it, which will in the future control
that dependency graph is actually evaluated.
This check is not yet done because there are some things to be taken
care about first: for example, post-update hooks might leave scene in
a state where something is still tagged for update.
- All operators which needs to access evaluated state must use
CTX_data_ensure_evaluated_depsgraph().
This function replaces OPTYPE_USE_EVAL_DATA.
The call is generally to be done in the very beginning of the
operator, prior other logic (unless this is some comprehensive
operator which might or might not need access to an evaluated state).
This call is never to be used from a loop.
If some utility function requires evaluated state of dependency graph
the graph is to be passed as an explicit argument. This way it is
clear that no evaluation happens in a loop or something like this.
- All cases which needs to know dependency graph pointer, but which
doesn't want to actually evaluate it can use old-style function
CTX_data_depsgraph_pointer(), assuming that underlying code will
ensure dependency graph is evaluated prior to accessing it.
- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
explicit and local about where dependency graph is being ensured.
This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.
Fixes T67454: Blender crash on rapid undo and select
Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.
Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut
Reviewers: brecht
Reviewed By: brecht
Subscribers: lichtwerk
Maniphest Tasks: T67454
Differential Revision: https://developer.blender.org/D5343
|
|
Use explicit boolean flag to indicate whether flush to original data
is needed or not. Makes it possible to avoid confusion on whether an
evaluated or any depsgraph can be passed to the API.
Allows to remove depsgraph from bAnimContext as well.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5379
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
|
|
|
|
|
|
|
|
|
|
There was a fixed limit to the number of points available in a buffer stroke.
Now, the array is expanded as needed using a predefined number of points for each expansion, instead to add one by one. This is done to reduce the number of times the memory allocation is required.
As part of the fix, some variables have been renamed to reflect better their use.
|
|
Setting the 3D view cursor on startup could crash because the
viewport hasn't been assigned to the region.
|
|
Spawns a separate thread to do any VR session drawing on. There are
four reasons for this:
* VR session doesn't need the usual main loop procedure for drawing.
With the drawing on a separate thread, the session doesn't have the
overhead of the other parts of the main loop.
* OpenXR performs thread blocking operations to synchronize rendering
with the device refresh rate. This would conflict with the rest of
Blender, causing lags on event handling, drawing, etc.
* With an own thread, we can keep a single OpenGL context alive,
avoiding expensive context switches. This should improve performance
significantly.
* With a bit more work, viewports can draw entirely in parallel (at
least the CPU side of it), pushing performance even further.
Drawing the viewport on a separate thread shouldn't be much of an
issue. The draw-manager is already thread safe (mutex guarded). Not much
seems needed to get it entirely concurrent, allowing viewport drawing
from separate threads without any synchronization (i.e. only one at a
time).
I had to create an own depsgraph for the VR draw thread so the viewport
gets its own buffers for its own OpenGL context.
Right now this is utterly broken, but at least an empty viewport is
drawn for the VR session in a separate thread. Issues are:
* VR viewport doesn't draw any objects, just background + overlays
(apparently the VR session depsgraph isn't built correctly).
* OpenGL context of the main thread seems messed up when drawing the VR
view. Result is drawing glitches and eventually Blender crashes.
* Exiting the VR session causes failed assertions and memory leaks.
|
|
This commit moves the API of selecting faces, vertices and edges to a DRW manager engine.
Reviewers: campbellbarton, fclem
Subscribers: jbakker, brecht
Differential Revision: https://developer.blender.org/D5090
|
|
If the control object is in the origin the radius is wrongly calculated because the result is 0.
Now, this value is clamped to avoid this situation
|
|
The constant variable was passed as reference to constant variable, but it's better use the new function to copy values.
This could be the problem with T67772
|
|
- Offset was halved & not compensating for non-square aspect.
- Rotation was flipped.
|
|
Regression from 2.79
|