Age | Commit message (Collapse) | Author |
|
These were almost exact duplicates, use one engine for drawing both
kinds of vertex color.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
Each engine was doing this on its own.
Move to DRWContextState, use an enum.
|
|
|
|
|
|
Add 'G_draw' for all draw manager globals,
avoids adding extern to each file.
Connection between `ts` and `globals_ubo` wasn't obvious,
now called `G_draw.block` & `G_draw.block_ubo`.
|
|
THis is in order to avoid the jungle of names being different at each
step of the API.
Also removes some unused functions.
|
|
|
|
|
|
This reduce the number of batch/data needed. Stores a select/visiblee
flag inside the vert/loop normals.
|
|
|
|
The editflag field is only valid in the original mesh instance.
|
|
Add an option to display contour lines tracing through points with the
same interpolated weight value in weight paint mode. This can be useful
for working on gentle gradients over a relatively high resolution mesh,
where the difference in color between adjacent vertices is very small.
The contour grid has 3 levels of detail going down to step 0.001,
which automatically fade in or out based on the weight gradient.
Fade out works by capping both screen space and weight space line
width, and reducing alpha when the screen space width becomes too
small for moire and noise-less rendering.
Reviewers: fclem
Differential Revision: https://developer.blender.org/D3749
|
|
Move the weight paint drawing to the fragment shader. The shader
uses a texture that uses the U.coba_weight custom color band, or
an internal color band.
In addition to actual weights, the shader has to display two
alert colors: missing vertex group, and zero weight. The zero
weight alert has to be blended with regular weight colors,
so that a single alert vertex surrounded by weighted ones is
still visible.
Reviewers: campbellbarton, fclem
Differential Revision: https://developer.blender.org/D3675
|
|
This was because weight paint was using the original obj to show weights.
But the mesh can be deformed by the armature and this is not visible on
the original object.
|
|
This adds existing behavior from calc_weightpaint_vert_array
that was missing from the new rendering code:
- No selected Vertex Group displays as a solid pink color.
- Zero weight displays as alert color depending on Options.
- Multipaint mode correctly displays collective weight.
In order to properly implement this variety, a data structure
holding all relevant parameters is introduced.
Reviewers: fclem, campbellbarton
Subscribers: jbakker
Differential Revision: https://developer.blender.org/D3722
|
|
Use the multiply blending mode for the weight paint overlay.
To support the opacity slider, we need a new shader. Otherwise this combination of multiplication and mixing does not seem to be supported by glBlendFunc.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3727
|
|
This was introduced in the original implementation of weightpaint
in 2.8 (20f95de6ba2d). But this is very shortsighted, we can't assume only one
object will be edited at once, nor should we tag things during drawing.
There is a chance this introduces "bugs". If it does, we then tackle them in the
proper way (usually tagging DEG after operators changing the weight paint data).
|
|
|
|
Entering any of these modes would assert immediately.
|
|
|
|
Selection changes weren't showing.
|
|
There was a Full Shading bool that was shared across the WP, VP and TP
modes. This commit makes some changes:
- Replace the bool with a factor. This gives the user more control on
the visibility.
- Also draw it on top of the Material and Rendered mode so the user can
control what he needs. In certain cases you don't want to see the final
rendered material, but the actual texture.
- Removed the skipping of objects when in paint modes. As now the paint
modes are blended.
|
|
|
|
For some we may add per object overrides, but for most we plan to keep them
strictly per viewport settings. Display settings from the mesh still need to
be moved here, only collections were done to remove that code.
|
|
- Disable VertexPaint and WeightPaint for OB_MATERIAL and OB_RENDER. Users want to see the final result
- When in OB_SOLID, the active object should be rendered without any color. The lighting information is multiplied with the VertexPaint/WeightPaint color
- Removed the use_shading flag from VertexPaint and WeightPaint
- add method to check if render engine should draw without color (DRW_object_in_only_lighting_mode)
Reviewers: fclem
Tags: #code_quest
Maniphest Tasks: T54894
Differential Revision: https://developer.blender.org/D3191
|
|
For simplicity we choose to execute the rendering of Opengl engines in the main thread and block the interface.
This might be addressed in the future at least for video rendering.
A drawmanager wrapper (DRW_render_to_image) is called by the render pipeline to set up the Opengl state and then call the specific draw_engine->render_to_image function.
|
|
Caused an error entering edit-mode.
d60f26f37a & 2659500835
|
|
This clears up the code from many DynStr usage. Easier to read.
|
|
This makes updates for the viewport cleaner and also add the possibility to add a new callback called when the scene is updated.
|
|
- NOCHECK -> ALL
- ALL -> MAYBE_ALL
Where 'MAYBE_ALL' checks to see if the mesh has changed.
This is clearer that `BKE_MESH_BATCH_DIRTY_ALL` is dirty and
going to be updated without any guess-work.
|
|
Without this face selection would be used but invisible,
display this over fully shaded surface.
|
|
This also renames some flags/variables to be more generic for updating
purposes. The call used here was previously only used for updating
paint data, but as it was reused here, flags and variables were renamed
to accomodate more clearly to the new usages.
|
|
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
|
|
|
|
|
|
|
|
|
|
This add a new set of (possible) render settings that can be defined at
the scene level and overridable at the scene layer level.
Once we get workspaces we can either add workspace inbetween scene and
scene layer evaluation. Or to replace layer settings, to avoid extra
confusion to users.
An example of this setting is "samples", as implemented now for the clay
engine.
|
|
Now passing selection state instead of colors for the wire/face mask
overlay thing. Also added masking indication on the faces in vertex
paint.
|
|
Reviewers: fclem
Subscribers: campbellbarton, dfelinto
Differential Revision: https://developer.blender.org/D2658
|
|
Those problems were introduced on 20f95de6ba2d32dcff553251ff4de2efd5b76955.
|