Age | Commit message (Collapse) | Author |
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
|
|
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
|
|
Fix instancing batches not being reused by custom bone shapes.
Drawing thoses is now faster than 2.79 (40fps instead of 30fps)
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.
view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.
|
|
frontside object in 3d-window
Now the depth order of objects when trying to select them is only used when not in X-ray mode.
Before, this was only the case in wireframe mode regardless of X-ray settings.
I've also unified the usage of V3D_XRAY and XRAY_FLAG as they were basically copies of each other.
Reviewed By: Clément
Differential Revision: http://developer.blender.org/D4504
|
|
This forces bone transparency / wireframe display when Xray is enabled.
This makes sense as the bone transparency is a kind of Xray and should
be linked to the Xray display.
|
|
This was not working in edit mode and broken in posemode + bounding box
display type.
This makes possible to select bones inside other bones.
|
|
The option is replaced by the Wireframe mode display which (in edit & pose
mode) does exactly what transparent bones did.
|
|
This makes the bones transparent when the object or the viewport display
type is Wireframe. This is in order to make things consistent.
In object mode all bones are fully transparent to not create more visual
noise if the scene is complex.
Another small addition is that the Bounding Box draw mode now works as
expected on armatures.
|
|
Also move view_ubo into G_draw.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
|
|
|
|
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 half the replacement of the old wireframe mode. It's not doing any
XRay drawing at the moment.
|
|
|
|
|
|
In object mode, the axes are drawn like any other wire objects with
depth test and depth write. Thus enabling MSAA to work but not their xray
behaviour.
In edit armature/pose mode, draw smooth line without depth testing. This
produces wrong draw ordering problem but still gives the desired xray
behaviour. We do it outside of the MSAA pass since the xray behaviour is not
compatible with it. But we are drawing smoothed lines so no need for MSAA.
The lines are 2px thick and improve readability.
|
|
|
|
We now use a more pleasant and efficient way to display enveloppe bones
and their radius.
For this we use a capsule geometry that is displaced (in the vertex shader)
to a signed distance field that represents the bone shape.
The bone distance radius are now drawn in 3D using a "pseudo-fresnel" effect.
This gives a better understanding of what is inside the radius of influence.
When capsules are not needed, we switch to default raytraced points.
The capsules are not distorded by the bone's matrix (same as their actual
influence radius) and are correctly displayed even with complex scaled
parents hierarchy.
|
|
Appart from the performance issue, the MSAA resolve pass is not compatible
with additive passes.
|
|
|
|
This fix the issue with the zfighting we were getting at bones edges.
Moreover, this enables us to render arbitrarly large outline with
varying thickness.
|
|
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.
|
|
This makes updates for the viewport cleaner and also add the possibility to add a new callback called when the scene is updated.
|
|
You can change the amount of samples in the user preferences. You do not need to restart blender to see the effect in the new viewport.
This adds another Multisample Framebuffer and textures (so even more memory required).
It works by blitting the default_fb to the multisample_fb each time the renderer need to render one or more "wire" pass.
It it then blit back to the default_fb so that the rest of pipeline is working as expected.
We COULD lower the GPU memory / bandwidth usage to render everything to the same multisample fbo and change the logic depending on if MSAA is enabled or not, but I think it's a bit too much work for now.
|
|
|
|
This indeed needed its own draw pass, thank to @fclem for the hints!
Also fixes a stupid mistake in bones head/tail coloring.
|
|
Changing states didn't properly reset between shading groups
causing the GL state to be wrong based on draw order.
States are now only set when changed.
|
|
Without this the intent isn't clear.
|
|
Also remove from pass list (there were some duplicate unused entries).
|
|
This removes MAX_STORAGE, MAX_BUFFERS, MAX_TEXTURES, MAX_PASSES limits.
Actual memory saving isn't so important, it just means we don't need to
manually bump these based on changes to engines.
|
|
Faster search
|
|
This makes viewport cache construction independant from each others and will allow multithread down the road.
|
|
|
|
|
|
|
|
All engines are now called by the draw manager. Engines are separate entities that cannot interfer with each others.
Also separated draw_mode_pass.c into the mode engines.
|
|
|
|
|
|
This should give the overall direction to whom wants to finish it.
- Renamed EDIT mode engine to EDIT_MESH mode engine
- Introduce EDIT_ARMATURE mode engine
- Started to port legacy drawarmature.c to draw_armature.c
|