Age | Commit message (Collapse) | Author |
|
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.
|
|
This adds a new geometry shader (specific to edit mesh for now) that
reproduces the effect of glLineWidth > 1.0, since this is not supported on
all platform.
This fix could be generalized to other shaders later.
|
|
Cleanup after recent refactor.
|
|
Following removal from C source code.
See: 8c68ed6df16d8893
|
|
The algorithm used is borrowed from :
http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html
This makes it possible to have a decent blur for foreground over defocused
background in one pass only.
The algorithm is using a gather approach that is much faster
than the scatter approach used in Eevee. This makes it possible to have
custom bokeh shapes (not implemented yet) which would be impossible with
a separable gaussian technique.
The blur is done in 2 steps. The first one define the shape of the bokeh
and the second that fill the undersampling.
A downsample max-CoC tile texture speed up the gathering process.
|
|
|
|
Originally I wanted to avoid adding draw manager specific ifdef's all
over generic shaders however this isn't needed in so many places.
Also there are shaders that are only used by the draw manager so
duplicating them only to have the original unused doesn't make sense.
|
|
DRW_shader_get_builtin_shader can replace GPU_shader_get_builtin_shader
when we need to support clipping.
Use this for loose point & wire drawing in object mode,
clips edges in lattice edit mode.
|
|
Caused:
error: unsized array index must be constant
Use hard coded number of clipping planes, copying the 4th to 5 & 6
when only 4 are used.
|
|
|
|
Shaded triangles are not yet implemented (request from gpumaterials).
This also changes the mechanism to draw curve normals to make it not
dependant on normal size display. This way different viewport can
reuse the same batch.
|
|
Also this display is optimized. It does not use blending and pixel discard.
Working with scanned data should be more pleasant with this.
A better option would be to use gl_FragDepth to have a better sense of
volume but this discards early depth test.
|
|
Some drivers accept shaders with only vertex stage, but some just silently
fails.
|
|
We separate the background and foreground shading passes to be able to make
the object id pass optionnal if we don't need it.
This saves a bit more memory. Also not clearing all rendertargets saves
some GPU time too.
|
|
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.
Also a new Simplify option has been added to disable blend layers.
|
|
e.g. sculpting
The approach is fairly simple, just apply an edge detection filter to the view normal and scale the brightness based on that.
The overlay is disabled at object boundaries to avoid dark lines around objects.
Generally, this implementation follows the proposal of @monio at https://blender.community/c/rightclickselect/J9bbbc.
The changes are:
- Dynamic filter radius (on high-DPI displays, a radius of two is used)
- Options to reduce the strength of both ridges and valleys
- Tweaked function for the strength reduction (the original method actually had a local maximum, resulting in a brighter line inside valleys)
- Multiplication for blending instead of overlay, which doesn't work reliably with scene-referred intensities
- Renamed to point out the distinction between it and the SSAO-based cavity overlay
Reviewers: jbakker
Reviewed By: jbakker
Subscribers: billreynish, manitwo, linko, monio
Differential Revision: https://developer.blender.org/D3617
|
|
and cleanup
The crash only occurs with Intel 3rd generation GPUs.
It occurs because the program needs to be used at least once in the opengl context in which it is created.
|
|
This decouple the vertex display from the face+edges.
This is to reduce the number of triangles required to fix the edges
artifacts (aliasing) and increase viewport reactivity when not actively
navigating (ie. mouse scroll).
Also it makes all vertices visible (not cut-off) even when navigating.
However it makes the navigation drawing a bit slower because it has to
render twice.
Also add a depth bias to the wires to avoid depth fighting when previewing
final mesh (modifiers applied).
|
|
New shader to simulate a glow of the color.
The glow can be generated by luminance threshold or using a selection color.
|
|
|
|
Initial implementation of effect to create a drop shadow of the strokes
|
|
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
|
|
|
|
Now handles are drawn using index buffer instead of duplicating memory
requirement.
Also make use of shader tricks to draw handles antialiased, and respond to
UI scalling.
Make vertex point match edit mesh vertex size.
|
|
|
|
This was not ported yet.
|
|
* Remove support for diffuse color in the pbvh buffers.
* Upload raw data to GPU.
* Only draw nodes that have mask data when drawing the overlay.
This should fix T56466
|
|
|
|
|
|
Xray object can be see through other objects. They cast shadows as well
but cannot receive then.
|
|
This commit merge the full development done in greasepencil-object branch and include mainly the following features.
- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.
You can get more info here:
https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/
This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.
Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
|
|
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 separate probe rendering from viewport rendering, making possible to
run the baking in another thread (non blocking and faster).
The baked lighting is saved in the blend file. Nothing needs to be
recomputed on load.
There is a few missing bits / bugs:
- Cache cannot be saved to disk as a separate file, it is saved in the DNA
for now making file larger and memory usage higher.
- Auto update only cubemaps does update the grids (bug).
- Probes cannot be updated individually (considered as dynamic).
- Light Cache cannot be (re)generated during render.
|
|
- TAA is also enabled for Forward rendering
- Uses less GPU memory (removed one history buffer)
- TAA is done after the color management
- consolidated the aa code between forward and deferred rendering
(workbench_effects_aa.c)
|
|
- FXAA is now also done in the workbench_forward engine.
- User can enable TAA8 in the userpref by setting their max
viewport AA to TAA8. FXAA will still be used when navigating
|
|
- added a lib for shaded functions
- decreased active face inner size
|
|
FXAA implementation in the deferred renderpass of the workbench.
Can be enabled per 3dview. Eventually this will also be a user setting
as it is more a system/performance setting than a scene setting.
|
|
The ClayEngine was introduced to test the blender2.8 architecture during
development. As currently we have the wanted features implemented with
matcaps we are going to remove the clay engine as it was never intended
to be an official releasable engine
Note: The test cases are never run. But when enabled will be skipped as
they were implemented over the Clay Engine
|
|
This Fix the problem when multiple objects are selected and one of them
occlude the others. You cannot see clearly what is selected.
With this option, selection is more clear when Xray mode is enabled.
|
|
There was a method explained in the Weighted Blended Order-Independent
Transparency paper to support hardware that does not support per render
target blending function.
So now only 2 geometry passes are required instead of 3 (one being the
outline/depth fill pass).
This also fix how the blending is done. There was some premult confusion
in the implementation.
|
|
This patch reduce the branching in the lamp loop, improving compilation time
noticeably (2372ms to 1785ms for the default shader).
This should not change the appearance of the shader.
Performance impact is negligeable.
|
|
A cavity shader based on SSAO. Works on all workbench deferred passes.
Per 3d viewport the cavity shader options can be set as different
shading needed different options. Some global options are in the
Viewport Display of the scene like num samples and distance.
Experimental: Naming of Ridges and Valleys
|
|
Intel GPU take more advantage of the geometry shader than other vendors.
Using a simple geom shader approach in this case is more performant.
|
|
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).
Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
Therefore, you can turn all of them on/off from the "Overlays" popover
* By and large, we have kept the same draw style as was used in 2.7
Further changes can happen later following further design work.
* One change from 2.7 is that thicker lines are used by default (2px vs 1px)
Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
conversion step on each drawcall). Instead, this has been moved to the calculation step
(in blenkernel). Soon, there will be some cleanups/improvements with those functions,
so until then, we'll keep the bad level calls.
Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.
Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
|
|
This overlay is showing mesh topology. It is usable with transparency
even if the mesh order can mess up with the expected result (some object
more prominent than others).
Edge thickness and alpha values are hardcoded for now but can easily be
added to theme or object settings.
|
|
This new system use transform feedback to compute subdivided hair points
position. For now no smoothing is done between input points.
This new system decouple the strands data (uv, mcol) with the points
position, requiring less update work if only simulation is running.
In the future, we can have compute shader do the work of the feedback
transform pass since it's really what it's meant to. Also we could generate
the child particles during this pass, releasing some CPU time.
draw_hair.c has been created to handle all of the Shading group creations
as well as subdivision shaders.
We store one final batch per settings combination because multiple viewport
or render could use the same particle system with a different subdivision
count or hair shape type.
|
|
|
|
This new API aim to provide simple function that can be called by the draw
engines during any phase of the draw pipeline. All calls are saved and
issued after all engines have finished rendering.
This removes the need of setuping special passes and shading groups for some
simple debug drawing.
|
|
|