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 was deliberately disabled since I didn't get the drawing working
originally. It is fully working now.
Note: camera lens widget still needs to be fixed since it still draws it
wrongly.
|
|
|
|
|
|
|
|
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.
|
|
- Add manual depth offset to vertices and edges.
- Revert to plain edge decoration.
- Fix active edge coloring.
- Remove active face display if not in face selection mode.
- Add wide line support.
|
|
Cleanup after recent refactor.
|
|
This is work in progress. Look is not final.
This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.
We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.
This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the
This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
|
|
Following removal from C source code.
See: 8c68ed6df16d8893
|
|
Needed for clan-format not to wrap onto one line.
|
|
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
|
|
* Use simple default view transform for color pickers, as Filmic does not work
well for all types of colors. We better handle this with an option and tagging
of colors as emissive or albedo like.
* For solid/workbench we also no longer use Filmic, as there is not enough contrast
and it's not really needed since this is not physically based lighting.
* For lookdev always take into account the view transform and look. Other view
settings like exposure are only taken into account if scene lighting is used,
since these are often dependent on scene light intensity.
Fixes T61022, T57649, T59363.
|
|
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.
|
|
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.
Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.
For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.
Differential Revision: https://developer.blender.org/D4274
|
|
|
|
|
|
Improve clang-format output.
|
|
Only keep this function when drawing to avoid COW overhead that reduce performance.
After some changes I did some time ago, the use of original ID was not required and this only added depsgraph overhead and problems.
This change solves the problems with updates in render mode.
Related to T57484 and the changes requested by Sergey.
|
|
It is only used for solid mode for now but could be used by eevee in the
future.
|
|
|
|
Support the alpha channel use of the object color in solid mode.
The Transparency effect is still using the Xray algorithm and not
true Alpha blending.
|
|
This just maintain more parity accross the 2 visuals. Note that this is not
"real shadowing" just the facing factor shadowing.
|
|
This adds the posibility of having certain materials transparent in solid
mode. The option is (for now) per material only and thus only shows in
material color mode.
This uses the same rendering technique as Xray mode.
Note that objects are not considered transparent for selection with this.
|
|
|
|
- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise
For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.
|
|
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|
|
|
|
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
|
|
|
|
|
|
|
|
Comment or remove unused defines.
|
|
|
|
|
|
Pretty straight forward. Just an option to turn the DoF per viewport.
Default is off as in 2.79.
|
|
|
|
The particles were using the scale of the original object and the thickness of the stroke was not correct. Now, the scale is applied by particle.
|
|
- Compute samples positions on CPU.
- Use 3x3 Box blur instead of 2x2.
- Implement bokeh parameters.
With this commit, dof performance is almost negligeable.
The quality is a bit lower than before but can be improve. Also now big
Circle of confusion are supported (up to 200px).
Cost is ~1.25ms on AMD Vega with a 2560p viewport than full HD and
pretty shallow depth of field.
Coc downsampling and dilation is not used anymore for now (commented).
|
|
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.
|
|
Artists requested to show the stroke while drawing a new stroke using a material with fill color only, because it's very difficult to see the stroke.
Now the stroke shows always but using the fill color, not the stroke color because maybe is not set.
|
|
|
|
This interfered with drawing the mesh.
|
|
|
|
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.
|
|
|
|
|