Age | Commit message (Collapse) | Author |
|
|
|
This commit groups several options that were tested in grease pencil branch:
- Changes to fill algorithms and improves, specially in small areas and stroke corners.
New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.
Kudos to @charlie for coding this fill improvements.
- New 3D cursor view plane option.
Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.
- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.
Changes reviewed by @pepeland and @mendio
|
|
|
|
|
|
|
|
The shaders are: `GPU_SHADER_3D_FLAT_SELECT_ID` and `GPU_SHADER_3D_UNIFORM_SELECT_ID`.
This commit allows the drawing of the mesh select ids to be done on a 32UI format texture.
This simplifies the shader that previously acted on the backbuffer and had to do an uint to rgba conversion.
Differential Revision: https://developer.blender.org/D4350
|
|
|
|
In this case, the generic vertex attribute is {0,0,0,1}. So we look for
this case.
This fixes black text objects with a normal map applied. Also this could
help porting sculpt mode drawing to Eevee without supporting normal
mapping.
Note that will just fix black meshes due to T61870 but objects will not
show their normal map. So it's not a fix for this issue.
|
|
This was because color is not present in the density texture if there is
only one constant color. Adding it as a uniform.
|
|
This is a hacky fix. We just convert the int as a float and use it as such.
This works ok for small int but will not be correct for numbers greater
than 4194303.
Correct support would require deeper change for UBO creation and socket
conversion.
|
|
This was due to environement not being rendered with alpha blending. So
color was still written and contributed to the final render color. Now
we multiply by background alpha so that it removes any background pixels
intensity.
For this reason this made the (incorrect) final premult unecessary.
|
|
|
|
|
|
|
|
This commit possibly fixes the T58938.
The crash happens when a shader that is created in a rendering context is deleted and another shader with the same name/program of the deleted one is created in the same context and used in another context.
|
|
This makes possible to have os specific workaround inside the shaders.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
This was due to curve being not extrapolated correctly. Also curvemap range
was not taken into account.
|
|
Some old AMD drivers crash when a vbo with stride 1 is used a few times.
I have not found a real solution to this problem. So the solution was to use a vbo with stride 4 (which in theory is less efficient and takes up more memory space).
|
|
The geom shader check was not needed and this uncovered an error in the
GPU_BARYCENTRIC_TEXCO optimization recently commited.
|
|
Almost every pulldown menu and popover has a little dropdown arrow shape.
Unfortunately it is a bit wonky. The top of the right side of it is wider than the top of the left side. And both sides are narrower at the bottom than the top. It might be hard to see, but this image should help:
{F6728281}
The patch fixes the symmetry of the shape while keeping the weight as similar as possible. In the following image you can see the outline of the current version in red and this new version in green.
{F6728298}
With patch applied the arrow looks perfect:
{F6728302}
Reviewers: brecht, billreynish
Reviewed By: billreynish
Subscribers: pablovazquez
Tags: #bf_blender, #bf_blender_2.8, #user_interface
Differential Revision: https://developer.blender.org/D4424
|
|
This fixes the general case. It is still not supported for hairs.
Added a hack in the geometry node to avoid unnecessary geometry shader
usage.
|
|
|
|
|
|
|
|
|
|
There is still work needed to be done from multires side to fully
support smooth shading. So can't just always have smooth shading.
Roll back to a proper code in GPU side, the rest will be handled
from CCG side.
|
|
The multires sculpt drawing was a not working in smooth mode.
Also hidding was not supported by the wireframe overlay and flat shaded
faces.
Codewise it is cleaner and index buffers are only updated if the
smoothing changes.
|
|
The dependency graph now handles updating image users to point to the current
frame, and tags images to be refreshed on the GPU. The image editor user is
still updated outside of the dependency graph.
We still do not support multiple image users using a different current frame
in the same image, same as 2.7. This may require adding a GPU image texture
cache to keep memory usage under control. Things like rendering an animation
while the viewport stays fixed at the current frame works though.
|
|
|
|
Some GPUs complain about `error C7011: implicit cast from "int" to "uint"` even if the cast is explicit.
|
|
This introduce the wireframe batches. Creating the indices buffer does
not seems to slow down the sculpt in my testing (but it is kind of hard to
test reliably)
This includes a bit of cleanup in gpu_buffers.c.
|
|
This will effectively make the AA passes thicker in some cases but it is
required for better AA on wireframes. The trick is to occlude the wire
passes so that they do not output fragment that could be behind actual
geometry.
|
|
Fixes T59784.
Reviewers: fclem
Reviewed By: fclem
Subscribers: brecht
Maniphest Tasks: T59784
Differential Revision: https://developer.blender.org/D4269
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
We should clamp the result after multiplication.
|
|
|
|
Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.
|
|
|
|
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
|
|
The struct name is descriptive,
this isn't going to be confused with other variables.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Select clipping now works when x-ray is disabled.
|
|
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 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.
|