Age | Commit message (Collapse) | Author |
|
The way how particle state is to be accessed or used did not change
in Blender 2.8, so the drawing code should follow old design.
This code is somewhat duplicated from drawobject.c, but old draw
code is on the way to be removed anyway.
This fixes issue with disappearing particles when tweaking number
of particles.
|
|
This is also much cleaner and taking 1 drawcall instead of 2.
|
|
This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.
The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.
Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.
|
|
|
|
Avoid copy-pasting same comments.
|
|
Use GWN_vertbuf_raw_step in a loop for less verbose vbo creation.
|
|
This fix T53485 : Ortho cameras display frame when in camera view
|
|
|
|
Text
**ToDo:**
- add vertbuff for UV (what can be adapted from `dl_surf_to_renderdata`)
|
|
Differential Revision: D2914
|
|
|
|
|
|
Were using Batch_ prefix still
|
|
Use ownership flags instead.
|
|
|
|
Support using full material shading in sculpt & paint modes mode.
Access 'Full Shading' from the display panel when in paint modes.
|
|
Read from the GPUMaterial to find custom-data layers used for drawing.
This resolves problem where having UV's would always calculate tangents
causing noticeable slow down compared to 2.7x.
|
|
|
|
Introduce specific shape for each probe type to easily identify them.
|
|
This implements UV support for Eevee hair, enabling the usage of
textures.
|
|
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
|
|
|
|
Probe is a real general term, the new name is used often in docs online.
|
|
|
|
|
|
|
|
This makes particle color uniforms point directly to material color, and
particle size uniforms point directly to ParticleSettings size.
|
|
Uses workaround so material slots are used when neither blender-internal
or cycles are enabled.
|
|
|
|
This still has a couple of issues:
* Instancing is not working when multiple particle systems use the same
primitive. Only the last particle system to be drawn with a particular
primitive shows up.
* Because of colors being passed as uniforms with static variables, the
color of the collection of the last object to be evauluated is used for
all particles being displayed.
Also, note that while this is being drawn in the clay engine, this might
be moved to the object mode later intead.
Part of T51378
|
|
Mainly adding 'wire' suffix to wire/distance drawing func and shader.
Also, match wire vertex shader behavior with solid one regarding
head/tail only drawing (i.e. alwas expect head bone mat, never tail one,
and assume that if a radius is negative, then we only draw on the other
end of the bone).
|
|
Envelope bones are now pretty much identical to old drawing code.
Note that currently new DwM drawing code does not seem to care about
wire/solid drawing modes at all, guess this is still TODO... For now we
hence just get both wire and solid for envelope bones, this can be
refined later.
|
|
This is not complete, it does not implement 3D solid drawing of
envelope bones. 2D wire is hence always drawn for now.
Some notes:
I did not try to implement the 'capsule' approach suggested by @fclem, because:
1. I spent enough time on this already, and finally got something working.
2. I managed to get rid of geometry shader completely.
3. Current approach allows us to use same shader for
distance outline and envelope wire.
It's working fine, except for one glitch - superpositions of envelope
outlines do not work as expected, not sure what's wrong here, tried to
disable zbuff, enable GL_BLEND, no luck so far...
I think we need our own 'background' drawpass to get them working (also
to avoid them drawing over the wire lines).
|
|
Some names are a bit arbitrary,
this makes it clear which names are VBO attributes.
|
|
|
|
Part of T51378
|
|
Used a triangle instead of a quad for fullscreen passes.
|
|
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
|
|
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
|
|
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.
|
|
|
|
|
|
- Added New Batch cache routine to get the split mesh for each material. (optimization needed)
- Did some shader modifications to create default_frag and support a somwhat correct fresnel for lamps (to finish)
|
|
Creating draw-cache should only ever be used by the draw-manager.
|
|
Draw cursor and selection, also support for fast-display.
|
|
Note that displists will be removed, but this wont be hard to replace.
Signed-off-by: Campbell Barton <ideasman42@gmail.com>
|
|
|
|
Return the 'Batch' instead of assigning a variable.
|
|
Draws the curve centerline and editmode verts/handles.
Handle theme colors, and normal display still need adding.
|