Age | Commit message (Collapse) | Author |
|
|
|
The vertex shaders depth offset was ignored in this case.
|
|
|
|
This is a step to finish the D4325 and fix the T61286.
Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`.
The idea of the code is to pass the steps of the grid already dimensioned as a uniform.
Another important thing to note is that subdivisions now only affect the grid without unity.
This matches the 2.7x Blender versions.
No performance loss (almost no gain too).
Reviewers: fclem
Subscribers: zlsa, rl.amorato
Differential Revision: https://developer.blender.org/D4379
|
|
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.
This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).
We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D5424
|
|
When using Vertex or Weight paint mode on a wireframe the overlay was
blended with the background. In this case we now use alpha blending.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5340
|
|
T68035 by @luzpaz
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
|
|
Vertices were hard to see, draw the same size as edit-mesh vertices.
|
|
|
|
When in texture paint mode and in solid mode the object that is being
texture painted will be rendered by the workbench engine with textures.
All other objects would render the same. For other cases the texture paint
draw engine will still draw the texture.
The texture mode draw engine now only drawn the masks. The opacity
sliders influences the texture mask.
This change has been implemented conserably. In the future we need to
look into making this better, like adding support that every object
can be colored differently. Currently when rendering in the workbench
we can have up to 3 different color types active (what the user selected,
the fallback in case no materials have been configured and this one,
forcing textures)
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D5190
|
|
|
|
|
|
|
|
The bias is done using the DRWView now, no need to double it.
|
|
All Shaders inside DRW should use gl_PointSize.
|
|
Migrate old legacy code to the draw mamager/object mode. The old legacy
version did not work with wireframe. By migrating the code
to modern draw manager code we have mode control on the drawing process.
Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels.
Also There are some artifacts when working with Holdouts and DoF, this
is because the draw engines do not pass the correct alpha values.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D4638
|
|
The Pose Bone Selection used normal matric multiplication, but that
mismatched the Depth buffer from all draw engines. They used the
optimized matrices from common_view_lib.
This change will use the optimized version, so the depth buffer matches
and the render artifacts would be correct.
Please note that bone selection is not using shcfg and therefore render clipping is still off.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5100
|
|
Unlike edge/vert this was blending with the regular selection color.
|
|
|
|
This was due to a double offset of the wireframe. We also reduce
the wireframe offset. The look of the wireframe overlay changes
a little with on distant wires.
|
|
Now texture storage of images is defined by the alpha mode of the image. The
downside of this is that there can be artifacts near alpha edges where pixels
with zero alpha bleed in. It also adds more code complexity since image textures
are no longer all stored the same way.
This changes allows us to keep using sRGB texture formats, which have edge
darkening when stored with premultiplied alpha. Game engines seems to generally
do the same thing, and we want to be compatible with them.
|
|
Depth testing was off as it used the precomputed ModelView matrix. As
draw engines currently use a different approach the depth was sometimes
a bit off making the color disappear.
This change will use a different vertex shader that will write the
correct depth. I expected the same change to be needed in the bone
selection overlay but was not able to reproduce it.
Reviewed By: fclem
Maniphest Tasks: T64615
Differential Revision: https://developer.blender.org/D5006
|
|
|
|
|
|
|
|
|
|
- Make edges darker in vert & face select mode (making more
contrast to not loose the topology). Downside is less select
edges visibility in vertex mode. But I'm confident that it's not
as painfull as it seems.
- Make select faces less saturated to have more color contrast
between select faces and edges.
- Make unselected faces white to increase contrast with faces and
edges. The brightening is negligeable for bright surfaces and
help readability on darker surfaces. Reminder that if the faces
overlays are too distracting (i.e: uv mapping, or texturing) they
can be toggled off in the overlay panel.
Reviewers: billreynish, campbellbarton, brecht
Reviewed By: billreynish, campbellbarton, brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D4941
|
|
This will have multiple benefit.
TODO detail benefits (culling, more explicit, handling of clipping planes)
For now the view usage is wrapped to make changes needed more progressive.
|
|
There may well be more vertex shaders that need this, but I couldn't find them
in my testing.
Differential Revision: https://developer.blender.org/D4921
|
|
Hair normals were not behaving correctly. This corrects their looks and
fix the node shader geometry that was showing the flat normal.
|
|
|
|
texture2D() is no longer supported by modern opengl, use texture() instead.
|
|
|
|
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
|
|
This is not the most clean but this is what is needed to make
point_object_to_ndc equivalent to
point_object_to_world + point_world_to_ndc
|
|
|
|
|
|
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.
Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.
Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.
Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.
This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.
Differential Revision: https://developer.blender.org/D4807
|
|
This removes ModelViewProjectionMatrix usage
|
|
|
|
|
|
|
|
Grid shader was still using deprecated eye vector.
|
|
|
|
|
|
This is in order to centralize all matrices transformations.
|
|
This means less matrices needs to be prepared by the CPU.
|
|
|