Age | Commit message (Collapse) | Author |
|
|
|
This is intended for quick renders for previsualization, animation previews
or sequencer previews. It provides the same settings as found in the 3D view
Shading popover in solid display mode, but in the scene render properties.
The "Workbench" engine was removed, and this name no longer appears in the
user interface, it's purely an internal name. We might come up with a better
name for this OpenGL engine still, but it's good to be consistent with the
OpenGL Render operator name since this has a similar purpose.
|
|
|
|
This does not fix the smokesim. It only port the drawing method.
The Object mode engine is in charge of rendering the velocity debugging.
Things left to do:
- Flame rendering.
- Color Ramp coloring of volume data.
- View facing slicing (for now it's only doing sampling starting from the
volume bounds which gives a squarish look)
- Add option to enable dithering (currently on by default.
|
|
This is a temporary solution to the use of the shared cache.
Ideally this cache should be per gl drawing context.
|
|
Note: Metaballs only support the first material slot. Splicing it per
material would create empty Batches. In order to overcome this we set
the batch for other materials to NULL. We added extra checks in EEVEE
and Workbench to not draw when the geom is NULL.
|
|
This make the limited wireframe not a performance problem anymore.
However, this does change the number of edges displayed as the threshold
is now computed per vertex instead of per edges.
For this reason we extended (internaly) the range of the slider so that the
users can hide more edge.
|
|
The default behaviour is to show the same amount of edges as 2.7.
The slider makes it possible to show all edges or even less.
|
|
This fix T55280 Loose edges not visible in object mode
|
|
Only OB_MESH is supported for now.
Creates a simple index buffer with negative indices if the edges is not a
real edge.
Also create the buffer texture representation of this buffer along with the
pos_in_order buffer texture.
|
|
Since this method have no failure case for manifold objects, use it.
|
|
This is much faster and simpler. This is also to make it compatible with
custom bone shape in the future.
|
|
|
|
The implementation is pretty straightforward.
In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle.
There is a paper on solid angle sampling for disks [1], but the described algorithm is based on
simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly
great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence.
Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a
way to analytically calculate the solid angle is required. This is technically possible [2], but the
calculation is extremely complex and still requires a lookup table for the Heuman Lambda function.
Therefore, I've decided to not implement that for now, we could still look into it later on.
In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations.
[1]: "Solid Angle Sampling of Disk and Cylinder Lights"
[2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential"
Reviewers: sergey, brecht, fclem
Differential Revision: https://developer.blender.org/D3171
|
|
This makes the shadows ~10 times faster in the general case.
This only create extrusion geometry on the outline edges. Also we increment
or decrement the stencil buffer by 2 for each manifold edge and only by 1
for non manifold. This make the algorithm robust yet less heavy than creating
one prism for each triangles.
|
|
|
|
Currently unused, but is required for an upcoming work.
|
|
We can not rely on edit->psys, it is not set for particle edit,
and there is some logic deeper inside which does different things
dependent on that.
We need to replace those checks with some some HAIR vs. PARTICLES
flag and always set psys pointer.
|
|
The idea is that edit mode structure is owned by original object,
and used for drawing. This is a bit confusing, especially since
path cache is also in that structure and needs evaluated object
to calculate cache.
In the future we should split edit data from visualization data,
but that's bigger refactor.
|
|
|
|
Does all points all the time, ignoring the setting in viewport header.
This is to be addressed by the next commit.
|
|
|
|
Currently set when setting the cursor location,
optionally used as an orientation type.
Intended for use by tools too.
See: D3208
|
|
The actual code is a bit convoluted but allows good and "pseudo efficient"
drawing. (pseudo efficient because rendering instances with that amount of
vertices is really inneficient. We should go full procedural but need to
have bufferTexture implemented first) But drawing speed is not a bottleneck
here and it's already a million time less crappy than the old (2.79) immediate
mode method.
Instead of drawing actual wires with different width we render a triangle
fan batch (containing 3 fans: bone, head, tail) which is then oriented in
screen space to the bone direction. We then interpolate a float value
accross vertices giving us a nice blend factor to blend the colors and
gives us really smooth interpolation inside the bone.
The outside edge still being geometry will be antialiased by MSAA if enabled.
|
|
|
|
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.
|
|
Now they are properly converted to Linear space before interpolation.
Since the only way to get vertex color in eevee and cycles is via the
attribute node with the CD_AUTO_FROM_NAME flag, we have to know at binding
time which type of buffer will be connected to this auto input.
We store this information inside the batch cache (together with the according
uniform name) and pass it as uniform to the shader which does conversion if
needed. The same shader can then be reused to draw another mesh with
different auto layers configuration.
|
|
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 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
|
|
|
|
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.
|
|
|
|
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).
|
|
|