This can be used by any engine actually. For example to give feedback
regarding probe caching in Eevee, ....
Unline master, we try to conciliate both the original viewport info
(FPS, view name) and the render info.
Note: I had to split the function in two because the camera alpha
passepartout is handled inside the view3d_draw_region_info function.
Review: Campbell Barton and Clement Foucault.
Thanks to Sergey Sharybin and Pablo Vazquez for some of the design
discussions.
This fix doesn't really fix the situaion now because at the moment we
only flush the evaluated flags at DEG_OBJECT_ITER time, which is silly.
But it's all we can do until we have CoW.
So the parent visibility flag is not flushed. And even if we flushed its
visibility flag, we would need to rely on having the parent flag flushed
before we get to the object in question.
Anyways, take this commit as a future fix for when depsgraph comes to
rescue all our souls.
This implements weight rendering with the draw manager, with all drawing
options (Shading, wire, face masking, vertex masking).
This is part of T51208
Reviewers: campbellbarton
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D2654
Note: We should test if the armature is the "armature modifier" parent of the
object.
If any good samaritan feels like tackling this, the function to change
is: DRW_pose_mode_armature
We still need to bring pose bone drawing for the pose engine.
Note: In the future, once we get face-widget selection, we will need to
make sure the pose engien only draws then if "weight paint mode" is not
enabled too.
In the future this will allow us to implement things like face manipulators.
For now however, this is getting on the way of using pose mode
(mesh objects are drawn green).
NOTE: pose engine should also be the one taking care of pose bones
(and for that matter, X-Ray armature option should/could be a property
of the Pose engine even).
8b2640f08 introduced the error,
caused by external-engine needing depth mask to be disabled,
which happened to be the case before changing state changing logic.
Most of this was copying/adapting code from octahedral existing draw
code, tough part was to get BBone matrices to behave as expected, they
are using a fairly specific setup...
Addresses T51365 and T51362.
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.
We can now use object and other modes on top of Cycles.
Since we are now always on "render_to_view" (old Rendered mode), the
pause button is always visible.
- code_generate_fragment : Making sure that shaders uses the new uniforms.
- code_generate_vertex_new : create require attribute based on their names and not their id (see draw_cache_impl_mesh.c).
- add support for ramp textures.
This is a bad implementation waiting for some improvement that are :
- Gawain support for multiple names. -> will remove duplication of attribute alloc
- Glsl safe name string escaping. -> will remove any risk of hash colision.
Old glsl drawing was relying on attribute being choosen by DerivedMesh at drawing time.
For this reason, we declare all possible attrib "name" for each data layer inside the batches.
In the glsl code, we declare required data by type and name.
Then Gawain only bind vbos if names correspond.
This is way cleaner as we do not need to access the CD itself when drawing.
One other problem is that the hash maybe 11 caracters long and rapidly overload gawain's attrib name buffer.
- Unify GPUMaterial creation (world/mesh).
- Support for multiple shader variations (not used for now).
- Convert GPUInputs to DRWUniforms to be used with the draw manager.
- Nodetree Update is not supported. The only way to refresh the shaders is to change render engine.
- Cleanup in GPUPass.
- Add new temporary Node Compatibility type. Compatibility types should be removed in the future.