Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
This patch adds support for PBVH drawing in EEVEE.
Notes:
# PBVH_FACES only. For Multires we'll need an API to get/cache attributes. DynTopo support will be merged in later with sculpt-dev's DynTopo implementation.
# Supports vertex color and UV attributes only; other types can be added fairly easily though.
# Workbench only sends the active vertex color and UV layers to the GPU.
# Added a new draw engine API method, DRW_cdlayer_attr_aliases_add. Please review.
# The vertex format object is now stored in the pbvh.
Reviewed By: Clément Foucault & Brecht Van Lommel & Jeroen Bakker
Differential Revision: https://developer.blender.org/D13897
Ref D13897
|
|
|
|
This avoid leaving a `GPUMaterial` in a `GPU_MAT_QUEUED` state which would
block rendering.
Fix T98603: Hang when saving project in material preview mode
Maniphest Tasks: T98603
Differential Revision: https://developer.blender.org/D15135
|
|
After this commit, all mesh data extraction and drawing code is in C++,
including headers, making it possible to use improved types for future
performance improvements and simplifications.
The only non-trivial changes are in `draw_cache_impl_mesh.cc`,
where use of certain features and macros in C necessitated larger
changes.
Differential Revision: https://developer.blender.org/D15088
|
|
- CustomDataType -> eCustomDataType
- CustomDataMask -> eCustomDataMask
- AttributeDomain -> eAttrDomain
- NamedAttributeUsage -> eNamedAttrUsage
|
|
Contributed by luzpaz
Differential Revision: https://developer.blender.org/D15057
|
|
full scaled image isn't used anymore. It was added to use a different scale when
displaying an image in the image editor. This was replaced by the image engine
redesign.
This change will reduce complexity of {T98375}.
|
|
This allows using the Graphic API to copy buffer data.
The GPU module do not expose untyped buffers even if that's what most API
do, so the copy function need to be strongly typed.
Contains GL backend implementation.
|
|
Without this, we could have crashes during static compilation of shaders
without knowing where it would come from.
|
|
|
|
This is often needed and somehow cumbersome to set up. This will allow some
code simplifications.
|
|
Since rB2a7a01b339ad, `lineSmooth` has lost its default value of true.
rBa0a99fb25284 only fixed the problem on master.
But thanks to @hitrpr for spotting the bug in version 3.2 too.
Differential Revision: https://developer.blender.org/D14876
|
|
Also add missing task-ID reference & remove colon after \note as it
doesn't render properly in doxygen.
|
|
|
|
Fall back onto the old behavior (use the render
color attribute) if the vertex color node's
attribute name is blank.
|
|
|
|
GLSL has different max number of ssbo per glsl stage.
This patch checks if the number of compute ssbo blocks matches
our requirements for the GPU Subdiv, before enabling it.
Some platforms allow more ssbo bindings then blocks per stage.
|
|
GLSL has different max number of ssbo per glsl stage.
This patch checks if the number of compute ssbo blocks matches
our requirements for the GPU Subdiv, before enabling it.
Some platforms allow more ssbo bindings then blocks per stage.
|
|
|
|
GPU code used `sz` as an abbreviation for size, as well as a few other
places. Use size where this represents a size in bytes, see: T85728.
|
|
This is caused by the geometry shader used by the edit mode line drawing.
If the drawcall uses indexed drawing and if the index buffer only contains
restart indices, it seems the result is 1 glitchy invocation of the
geometry shader.
Workaround by tagging these special case index buffers and bypassing
their drawcall.
|
|
|
|
This was because the shader had wrong output slot order.
This also add a note about why the order is reversed compared to the
texture binding.
|
|
|
|
Viewports where cleared explicitly due to compatibility reasons with Intel iGPUs.
This slowed down other platforms as well, this wasn't noticeable on all platforms.
This patch will be more selective when to enable the workaround.
Currently only for iGPUs on Mac + Linux.
|
|
|
|
Some drivers completely forbid quote characters even in unused
preprocessor directives.
This patch adds a debug build check for all `.glsl` files that need to
be manually handled. For shared headers with `#include` directives, we
need to do runtime patching of the source to remove the quote.
Also fix an instance of the quotes check failing in `eevee_next`.
|
|
|
|
This was caused by the `Closure` members being added to the final contribution
more than once. The workaround is to clear the members once a closure has
been added to the final contribution. I used `inout` on `Closure` inputs
so that the render engine implementation of mix and add closure nodes
can do its own thing. The nodegraph handling of inout was changed for this
to work.
|
|
This was caused by the name buffer not being ensured in all cases.
Change the behavior and always create the `NameBuffer`.
|
|
|
|
This fixes a threading issues when material shaders with textures are used.
It localizes the names of the samplers.
|
|
|
|
On certain systems when eevee is used in a 3d viewport could crash. It
happened more often on slower systems or systems with slower glsl compilers.
For example an Intel Mac Mini. The cause was that even if a GPUMaterial
was in used it could be freed.
|
|
python API
Adds an example python script to the documentation for the 3D_IMAGE shader.
The **use-case** is to draw textures with 3D vertex positions, in XR views as well as non-XR views (in a simpler manner).
**Testing**: I've tested that this compiles and works on my Macbook (with the example python script included in this change). I don't have access to a Windows or Linux machine right now, but this change doesn't look platform-specific and no new glsl shaders have been added or edited by this change. I'll try to get access to a Windows machine, but if someone does have one, I'd be really grateful if they could try this change. Thanks!
**Problem addressed**: The existing 2D_IMAGE shader (exposed in the python API) gets near-clipped when drawn in the
XR view, regardless of the near-clip settings. Additionally, the 2D_IMAGE shader only accepts 2D
positions for the image vertices, which means drawing textures in 3D requires providing
2D coordinates and then pushing a transform-rotate-scale matrix to the GPU, even for
non-XR (i.e. WINDOW) views. The 3D_IMAGE shader is simpler: it accepts 3D vertex positions, and doesn't require
any additional work by the scripter.
**Workaround**: The current workaround is to use custom shaders in the python script.
**Non-intrusive change**: No new glsl shaders were added. This change just bundles two existing shaders: the vertex shader used
by the 3D_IMAGE_MODULATE_ALPHA shader, and the fragment shader used by the 2D_IMAGE shader.
Reviewed By: #eevee_viewport, jbakker
Differential Revision: https://developer.blender.org/D14832
|
|
Since rB2a7a01b339ad, `lineSmooth` has lost its default value of true.
So set the value when creating the shader.
Differential Revision: https://developer.blender.org/D14876
|
|
This patch moves some of the utility library shaders into a common
directory and makes the necessary renames across shaders. Additionally,
material-specific transform functions were moved outside of math utils
into a separate transform_utils.glsl file.
This is needed in preparation for the viewport compositor, which will
make use of some of those utilities and will require all material
specific bit to be removed out of those files.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D14688
|
|
Overwriting UV map or vertex color data in Geometry nodes will move the
layers to another CustomData channel, and as such, will make attribute
lookup fail from the UVMap and Vertex Color nodes in EEVEE as the
CustomDataType will also be modified (i.e. no longer `CD_MTFACE` or
`CD_MCOL`).
As discussed in T93179, the solution is to use `CD_PROP_AUTO_FROM_NAME`
so that the render engine is able to find the attributes. This also makes
EEVEE emulate Cycles behaviour in this regard. `attr_load_uv` and
`attr_load_color` are also removed in favor of the generic attribute
API in the various GLSL shaders.
Although `CD_PROP_AUTO_FROM_NAME` is now used even for UV maps, the
active UV map is still used in case the attribute name is empty, to
preserve the old behavior.
Differential Revision: https://developer.blender.org/D13730
|
|
OCIO shader was ported to use GPUShaderCreateInfo a while ago. That
made this workaround not needed anymore.
Best to remove it before the release.
|
|
|
|
This had only one use and it was for debugging. Remove the shader for now.
This also simplifies the debug drawing even if slower.
|
|
This should have no functional changes.
|
|
This should have no functional changes.
This reduce the complexity of the shader by only supporting 2 colors.
We never use more than 2 color in practice and this makes usage not require
a UBO.
|
|
This should have no functional changes.
|
|
Those are usually not supported but some driver silently fix them and most
just silently fail (rendering error).
|