Age | Commit message (Collapse) | Author |
|
The term 'eval' is often used by depsgraph result,
where this is just used for drawing.
|
|
The term color is misleading, it's an integer id that happens to be
written to a color in some cases, then converted back to an integer.
|
|
Was confusing, unrelated to:
colbits, col_mask, col_group, actcol & totcol.
|
|
|
|
The dependency graph now handles updating image users to point to the current
frame, and tags images to be refreshed on the GPU. The image editor user is
still updated outside of the dependency graph.
We still do not support multiple image users using a different current frame
in the same image, same as 2.7. This may require adding a GPU image texture
cache to keep memory usage under control. Things like rendering an animation
while the viewport stays fixed at the current frame works though.
|
|
This removes the overhead of rendering the object one more time.
|
|
|
|
This introduce the wireframe batches. Creating the indices buffer does
not seems to slow down the sculpt in my testing (but it is kind of hard to
test reliably)
This includes a bit of cleanup in gpu_buffers.c.
|
|
|
|
We blit the depth buffer into the MSAA depth buffer so that wires are
properly occluded. This also makes the "In front" option work with MSAA.
|
|
|
|
This gets rid of the progressive fading of the edges as it does not work
with depth perception (sorting problem with alpha blending).
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
Rename for Camera, View3D (also CameraParams & Render not DNA)
|
|
These were almost exact duplicates, use one engine for drawing both
kinds of vertex color.
|
|
Black wire can be hard to see against dark blue,
especially when shading is enabled.
Use light grey, matches 2.7x.
|
|
By default wire would z-fight against the surface.
Increase the bias, also don't adjust the 'w' component
since it causes bias that depends on the view direction.
|
|
Assign to local variables when setting up passes,
avoids mix-up between similarly named struct members.
|
|
When vertex/face selection are disabled - show all wire
ignoring selection & hidden state.
|
|
It was caused by Null normal if the vertex is at origin. Just add a small
bias to avoid this case.
|
|
|
|
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
|
|
The struct name is descriptive,
this isn't going to be confused with other variables.
|
|
|
|
|
|
This avoid edges covering a part of vertices.
This comes at a (very minor) perf cost as vertices can cover some edges
pixels and early discard them with the depth test. But this only happens
in artificialy dense mesh and is not a real problem for common cases.
|
|
This make sure only one line is drawn per edge.
It makes the function mesh_create_edit_loops_points_lines() non-thread safe
but this is fine as of now because nothing is multithreaded at this point.
Also this is the only function use this flag so it might be OK.
The side effect is that we don't need to use depth test in edit mode
overlay so the masking artifact will not appear.
|
|
This remove the hint on the face edges. This is because the hint was
displayed on both sides and was requiring to draw every edges twice.
|
|
This make it (theoriticaly) compatible with all supported hardware with
consistent results.
Also we now draw the lines with analytic anti-aliasing instead of relying
on MSAA (which offers less benefits in our case).
The remaining aliasing comes from edges cut in half by the mesh which is
not rendered with MSAA. Hopefully this is not too much distracting and only
happen if the face is almost parallel to the view.
|
|
|
|
|
|
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed to fix T61196, supporting clipped back-buffer in the 3D view
which is done outside the draw module.
It was also inconvenient having DRW_shader_* versions of GPU_shader_*
API calls.
- Clipping distances are now supported as a shader configuration
for builtin shaders.
- Add shader config argument when accessing builtin shaders.
- Move GPU_shader_create_from_arrays() from DRW to GPU.
|
|
This was deliberately disabled since I didn't get the drawing working
originally. It is fully working now.
Note: camera lens widget still needs to be fixed since it still draws it
wrongly.
|
|
|
|
|
|
This adds a new geometry shader (specific to edit mesh for now) that
reproduces the effect of glLineWidth > 1.0, since this is not supported on
all platform.
This fix could be generalized to other shaders later.
|
|
- Add manual depth offset to vertices and edges.
- Revert to plain edge decoration.
- Fix active edge coloring.
- Remove active face display if not in face selection mode.
- Add wide line support.
|
|
Cleanup after recent refactor.
|
|
This is work in progress. Look is not final.
This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.
We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.
This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the
This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Improve clang-format output.
|
|
|
|
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|