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-04-29Select Engine: port shader to use 'GPUShaderCreateInfo'Germano Cavalcante
Simple port with a few cosmetic changes: - Attribute named "color" for indices VBO is now called "index" - The indices VBO is now composed of `int`s instead of `uint`s (this simplifies the source) Differential Revision: https://developer.blender.org/D14800
2022-04-29Cleanup: missing declaration warnings & spelling in commentsCampbell Barton
2022-04-28Cleanup: Overlay: Avoid local variable shadowingClément Foucault
2022-04-28Overlay: Port UDIM Grid shader to shaderCreateInfoClément Foucault
Simple Straight forward port.
2022-04-28Overlay: Port Grid shader to shaderCreateInfo and other code cleanupClément Foucault
Along with the port to createInfo this also: - Packs constant uniforms in a UBO. - Share enum declaration and unify names - Makes codeflow easier to undestand. - Split grid data to its own struct. # Conflicts: # source/blender/draw/engines/overlay/overlay_grid.c
2022-04-28Fix error holding stack memory in a uniformCampbell Barton
Caused by db622b5a0bea32cb3a78c0a4c7d4372a9178d27e
2022-04-28EEVEE: Add shader compilation progress in the viewportClément Foucault
Since rBfa43c47c7cb8446b632a4c0f712162ba615fe51f the progress bar do not show the compilation progress. This was misleading as users could think it could be canceled or prevent rendering. Now we just show how many shaders are still in the compilation queue inside each viewport. This number is more accurate than the percentage that was previously displayed in the progress bar.
2022-04-27Metal: GLSL Compatibility - Hosting default uniform values.Jason Fielder
There are a number of shaders, most notably grid_frag.glsl, which rely on default assignments to uniform values within shaders. This is not currently supported by the shader uniform push model implemented for the Metal backend, wherein uniform updates are pushed as a singular block of data. Any default assignment would become over-written. As such, adding assignments of these default values in the high-level, to ensure the correct value is written for all APIs. This likely impacts Vulkan push-constants as well. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14555
2022-04-22Curves: Further split of curves draw code from particlesHans Goudey
Extends the changes started in f31c3f8114616bb to completely separate much of the DRW curves code from the particle hair drawing. In the short term this increases duplication, but the idea is to simplify development by making it easier to do larger changes to the new code, and the new system will replace the particle hair at some point. After this, only the shaders themselves are shared. Differential Revision: https://developer.blender.org/D14699
2022-04-21Sculpt: fix missing null pointer checkJoseph Eagar
in workbench_engine.c
2022-04-21Commit D14179: Revamp Vertex Paint With C++Joseph Eagar
- Verrtex paint mode has been refactored into C++ templates. It now works with both byte and float colors and point & corner attribute domains. - There is a new API for mixing colors (also based on C++ templates). Unlike the existing APIs byte and float colors are interpolated identically. Interpolation does happen in a squared rgb space, this may be changed in the future. - Vertex paint now uses the sculpt undo system. Reviewed By: Brecht Van Lommel. Differential Revision: https://developer.blender.org/D14179 Ref D14179
2022-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20Cleanup: clang-formatCampbell Barton
2022-04-19Cleanup: GPUMaterial: Remove GPU_material_is_volume_shaderClément Foucault
2022-04-19GPU: Replace `GPUMaterialVolumeGrid` by `GPUMaterialAttribute`Clément Foucault
This is to make the codegen and shading nodes object type agnostic. This is essential for flexibility of the engine to use the nodetree as it see fits. The essential volume attributes struct properties are moved to the `GPUMaterialAttribute` which see its final input name set on creation. The binding process is centralized into `draw_volume.cc` to avoid duplicating the code between multiple engines. It mimics the hair attributes process. Volume object grid transforms and other per object uniforms are packed into one UBO per object. The grid transform is now based on object which simplify the matrix preparations. This also gets rid of the double transforms and use object info orco factors for volume objects. Tagging @brecht because he did the initial implementation of Volume Grids.
2022-04-19Workbench: Volume: Fix errors about unboud textureClément Foucault
2022-04-19DRW: Centralize smoke domain texture managementClément Foucault
This code was duplicated in multiple engines. Now it is the draw manager responsability to manage the throwaway fluid textures.
2022-04-18Cleanup: Clang tidyHans Goudey
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
2022-04-15EEVEE: Support disabling all lightprobe object contribution in viewportClément Foucault
This is supported throught the visibility toggle. The light cache will then only be used for world lighting. This is the behavior as light objects.
2022-04-14GPU: Make nodetree GLSL Codegen render engine agnosticClément Foucault
This commit removes all EEVEE specific code from the `gpu_shader_material*.glsl` files. It defines a clear interface to evaluate the closure nodes leaving more flexibility to the render engine. Some of the long standing workaround are fixed: - bump mapping support is no longer duplicating a lot of node and is instead compiled into a function call. - bump rewiring to Normal socket is no longer needed as we now use a global `g_data.N` for that. Closure sampling with upstread weight eval is now supported if the engine needs it. This also makes all the material GLSL sources use `GPUSource` for better debugging experience. The `GPUFunction` parsing now happens in `GPUSource` creation. The whole `GPUCodegen` now uses the `ShaderCreateInfo` and is object type agnostic. Is has also been rewritten in C++. This patch changes a view behavior for EEVEE: - Mix shader node factor imput is now clamped. - Tangent Vector displacement behavior is now matching cycles. - The chosen BSDF used for SSR might change. - Hair shading may have very small changes on very large hairs when using hair polygon stripes. - ShaderToRGB node will remove any SSR and SSS form a shader. - SSS radius input now is no longer a scaling factor but defines an average radius. The SSS kernel "shape" (radii) are still defined by the socket default values. Appart from the listed changes no other regressions are expected.
2022-04-14Metal: GLSL shader compatibility 4th passJason Fielder
MSL follows C++ standard convention, and such variable declarations within switch statements must have their scope localised within each case. Adding braces in all cases ensures correct behaviour and avoids 'case ... bypass initialization of local variable' compilation error. struct initialisation to follow C++ rules for Metal. Implicit constructors replaced with either explicit constructors or list-initialization where appropriate. Ref T96261 Authored by Apple: Michael Parkin-White Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14451
2022-04-14Metal: GLSL shader compatibility 3rd passJason Fielder
Undefined behaviour for divergent control-flow fixes, replacement for partial vector references, and resolution of a number of calculation precision issues occuring on macOS. Authored by Apple: Michael Parkin-White Ref: T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D14437
2022-04-14Cleanup: unused argument warningCampbell Barton
2022-04-14Cleanup: Further hair to curves renamingHans Goudey
These were missed in previous passes. Also remove some logic in `draw_hair.c` that was redundant after f31c3f8114616bb8964c8e7.
2022-04-14Curves: Split curve EEVEE/workbench functions from particle hairHans Goudey
The GPU evaluation for curves will have to change significantly from the current particle hair drawing code, due to its more general use cases and support for more curve types. To simplify that process and avoid introducing regressions for the rendering of hair particle systems, this commit splits drawing functions for the curves object and particle hair. The changes are just inlining of functions and copying code where necessary. Differential Revision: https://developer.blender.org/D14576
2022-04-14Cleanup: Make curve deform argument optionalHans Goudey
The "dir" argument to `BKE_where_on_path` was only actually used in a few places. It's easier to see where those are if there isn't always a dummy argument.
2022-04-11Cleanup: malformed C-style comment blocks, spellingCampbell Barton
- Missing star prefix. - Unnecessary indentation. - Blank line after dot-points (otherwise doxygen merges with the previous dot-point). - Use back-slash for doxygen commands. - Correct spelling.
2022-04-09UDIM: Move UDIM grid controls to the Overlay panelJesse Yurkovich
This change moves the grid panel UI from the View tab up into the Overlay panel. Reasons to move to the Overlay panel include: - Consistency with the grid options in the 3D viewport - The grid has been drawn as an Overlay for quite some time already Additional changes that now make sense to have: - The grid responds to the main Overlay show/hide toggle - Adds a toggle to show/hide the grid which is consistent with overlays in general As before, these grid controls are only available for active UV edit sessions. Differential Revision: https://developer.blender.org/D11862
2022-04-08Curves edit mode: show dots for pointsKévin Dietrich
This adds support to show dots for the curves points when in edit mode, using a specific overlay. This also adds `DRW_curves_batch_cache_create_requested` which for now only creates the point buffer for the newly added `edit_points` batch. In the future, this will also handle other edit mode overlays, and probably also replace the current curves batch cache creation. Maniphest Tasks: T95770 Differential Revision: https://developer.blender.org/D14262
2022-04-08Painting: Canvas switcher for painting brushes/tools.Jeroen Bakker
This patch adds color attributes to TexPaintSlot. This allows an easier selection when painting color attributes. Previously when selecting a paint tool the user had to start a stroke, before the UI reflected the correct TexPaintSlot. Now when switching the slot the active tool is checked and immediate the UI is drawn correctly. In the future the canvas selector will also be used to select an image or image texture node to paint on. Basic implementation has already been done inside this patch. A limitation of this patch is that is isn't possible anymore to rename images directly from the selection panel. This is currently allowed in master. But as CustomDataLayers aren't ID fields and not owned by the material supporting this wouldn't be easy. {F12953989} In the future we should update the create slot operator to also include color attributes. Sources could also be extended to use other areas of the object that use image textures (particles, geom nodes, etc... ). Reviewed By: brecht Maniphest Tasks: T96709 Differential Revision: https://developer.blender.org/D14455
2022-04-07Fix T97144 Overlay: Illegal recursive expansion of macrosClément Foucault
Was caused by the shaderCreateInfo port.
2022-04-07Cleanup: spelling in comments, minor reformatting changesCampbell Barton
2022-04-07Cleanup: clang-formatCampbell Barton
2022-04-05GPencil: Fix buiding with GTESTClément Foucault
2022-04-05Refactor: Unify vertex and sculpt colors into newJoseph Eagar
color attribute system. This commit removes sculpt colors from experimental status and unifies it with vertex colors. It introduces the concept of "color attributes", which are any attributes that represents colors. Color attributes can be represented with byte or floating-point numbers and can be stored in either vertices or face corners. Color attributes share a common namespace (so you can no longer have a floating-point sculpt color attribute and a byte vertex color attribute with the same name). Note: this commit does not include vertex paint mode, which is a separate patch, see: https://developer.blender.org/D14179 Differential Revision: https://developer.blender.org/D12587 Ref D12587
2022-04-05Fix T97010 GPencil: Artifacts on Grease PencilClément Foucault
Was caused by wrong name for uniform update. Regression introduced in rBeccb0b222e34
2022-04-05Cleanup: Change globalBlock members to snake caseClément Foucault
This avoid conflicting defines in GLSL Fix T96998 Blender 3.2.0 Alpha crashes on startup
2022-04-05Cleanup: Overlays: Remove unused facefill shaderClément Foucault
2022-04-04Fix T96575: Can't set vertex theme colorRichard Antalik
UV editor used wire color for drawing unselected vertices. Add color variable to shader, so theme color can be used. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D14373
2022-04-04Move ImageTileWrapper to BKE.Jeroen Bakker
ImageTileWrapper is a wrapper around ImageTile to centralize tile calculations when using CPP. Currentry used by the image engine and will be used for the 3d texturing brush project.
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-04-04Cleanup: clang-formatCampbell Barton
Add ccl_gpu_kernel_postfix as a statement macro to prevent the following declarations from being indented.
2022-04-01Cleanup: Use const for bounding boxes where possibleHans Goudey
2022-03-31GPencil: Fix regression with dots uvsClément Foucault
This was introduced by rBeccb0b222e3465baa71430223c5ee2f0206a7b02.
2022-03-31DRW: Rename DRW_shgroup_uniform_vec4_array_copy to mat4_copyClément Foucault
This function was not used for anything other than mat4. This was because of a limitation of the DRW module/ This makes it cleaner for the GLSL and also less tempting to use it for other unconventional purpose.
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-30Metal: Adding alternative support for GPU_PRIM_TRI_FAN/LINE_LOOP For Metal ↵Jason Fielder
backend. - Metal uniform array compatibility in DRW module. - Guard OpenGL-specific workarounds and flushes behind GPU_type_matches_ex API guard. Add further render boundaries for render paths called outside of the main loop. Authored by Apple: Michael Parkin-White Ref: T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D14438
2022-03-30Metal: GLSL Shader compatibility 5Jason Fielder
MSL does not have an implicit global scope, this is emulated via macro's adding an indirection for uniforms, attributes, shader stage inputs and outputs such as: #define roughness shaderinst->roughness. Variables in GLSL which exist within uniform blocks can be directly referenced via the global scope, unlike standard C++. This means that variable name pollution occurs if subsequent local variables in the code use the same name, resulting in compilation errors. A number of these conflicting names have been renamed to ensure unique naming and no further scope pollution. Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14452
2022-03-30Metal: GLSL Compatibility - explicit mat4_to_mat3 conversionJason Fielder
Explicit constructor for mat3 from a mat4 is not valid and cannot be overloaded. Adding explicit texture resource type flags for depth textures. This is an explicit requirement for Metal Shading language. This is a temporary compatibility, as this path is already supported in GPU_SHADER_CREATE_INFO under ImageType::DEPTH_2D, though required in shader source for MSL shaders which do not have create info. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14418