Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-17Cleanup: remove redundant string formattingCampbell Barton
2022-06-12Cleanup (GPU): Improve efficiency of circle drawing.Chris Blackbourn
2022-06-10Cleanup: Clang tidyHans Goudey
2022-06-09Cleanup: warningsCampbell Barton
2022-06-09Cleanup: quiet warningsCampbell Barton
2022-06-08Sculpt: PBVH Draw Support for EEVEEJoseph Eagar
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
2022-06-07Merge branch 'blender-v3.2-release'Clément Foucault
2022-06-07GPUMaterial: Make compilation fail when reusing failed `GPUPass`Clément Foucault
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
2022-06-05Cleanup: Move remaining mesh draw code to C++Hans Goudey
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
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-30Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz Differential Revision: https://developer.blender.org/D15057
2022-05-27GPU: Remove cached full/scaled image texture.Jeroen Bakker
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}.
2022-05-19GPUStorageBuf: Add `GPU_storagebuf_copy_sub_from_vertbuf()`Clément Foucault
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.
2022-05-19GPUSource: Add error message on source not foundClément Foucault
Without this, we could have crashes during static compilation of shaders without knowing where it would come from.
2022-05-18Cleanup: formatCampbell Barton
2022-05-15GPUVertBuf: Add support for binding as buffer textureClément Foucault
This is often needed and somehow cumbersome to set up. This will allow some code simplifications.
2022-05-13Fix T97872: Annotation lines lost AAGermano Cavalcante
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
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-12Merge branch 'blender-v3.2-release'Joseph Eagar
2022-05-12color attributes: Fix broken vertex color nodeJoseph Eagar
Fall back onto the old behavior (use the render color attribute) if the vertex color node's attribute name is blank.
2022-05-12Cleanup: formatCampbell Barton
2022-05-11Fix T97330: GPU Subdiv compiler error.Jeroen Bakker
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.
2022-05-11Fix T97330: GPU Subdiv compiler error.Jeroen Bakker
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.
2022-05-11Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-11Cleanup: use 'num' / 'size' suffix instead of 'sz'Campbell Barton
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.
2022-05-11Fix T96892 Overlay: Hiding all of a mesh in edit mode causes visual glitchClément Foucault
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.
2022-05-10Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-10Fix T95298 ImageEditor: Multi-view images fail to display properlyClément Foucault
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.
2022-05-10Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-10Fix T97272: Lag when resizing viewports.temp-T97272Jeroen Bakker
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.
2022-05-10Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-10Fix T97545 GPU: Crash caused by uncommented quote char in source stringClément Foucault
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`.
2022-05-10Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-10Fix T97985 EEVEE: Shader mixing not working correctly when reusing shader nodesClément Foucault
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.
2022-05-09Fix T97984: GPUCodegen: crash when loading demo fileClément Foucault
This was caused by the name buffer not being ensured in all cases. Change the behavior and always create the `NameBuffer`.
2022-05-09Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-09GPU: Unable to compile material shaders.Jeroen Bakker
This fixes a threading issues when material shaders with textures are used. It localizes the names of the samplers.
2022-05-09Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-09GPU: Fix crash deferred shader compilation.Jeroen Bakker
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.
2022-05-09EEVEE & Viewport: Add a built-in shader called 3D_IMAGE, and expose to the ↵Shashank Shekhar
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
2022-05-06Fix T97872: Annotation lines lost AAGermano Cavalcante
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
2022-05-06GPU: Move common shaders into a common directoryOmar Emara
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
2022-05-03Fix T93179: geonodes UVs and Vertex colors do not work in EEVEEKévin Dietrich
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
2022-05-02GPU: Remove OCIO workaround for Apple.Jeroen Bakker
OCIO shader was ported to use GPUShaderCreateInfo a while ago. That made this workaround not needed anymore. Best to remove it before the release.
2022-05-02Cleanup: GPUShader: Make style consistent in builtin_shader_stagesClément Foucault
2022-05-02GPUShader: Remove GPU_SHADER_INSTANCE_VARIYING_COLOR_VARIYING_SIZEClément Foucault
This had only one use and it was for debugging. Remove the shader for now. This also simplifies the debug drawing even if slower.
2022-05-02GPUShader: Port 3D uniform color clipped shaders to use shaderCreateInfoClément Foucault
This should have no functional changes.
2022-05-02GPUShader: Port dashed line shaders to use shaderCreateInfoClément Foucault
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.
2022-05-02GPUShader: Port polyline shaders to use shaderCreateInfoClément Foucault
This should have no functional changes.
2022-05-01GPUShaderCreateInfo: Add validation for overlapping vertex attributeClément Foucault
Those are usually not supported but some driver silently fix them and most just silently fail (rendering error).