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-07-24Replace metallic Fresnel with F82 modelLukas Stockner
2022-07-05Prevent Eevee from crashing with Principled v2Lukas Stockner
2022-06-20Fix T99019 EEVEE: Regression: Specular BSDF does not apply occlusionClément Foucault
Since the occlusion input is going to be removed in EEVEE-Next, I just added a temporary workaround. The occlusion is passed as SSS radius as the Specular BSDF does not use it. The final result matches 3.1 release
2022-06-20Fix T99018: EEVEE: Regression: Specular BSDF apply specular color input twiceClément Foucault
This was an oversight. I checked that no other node had the same regression.
2022-06-07Merge branch 'blender-v3.2-release'Clément Foucault
# Conflicts: # source/blender/draw/engines/eevee/shaders/volumetric_vert.glsl
2022-06-07Fix T98647: EEVEE: Camera Data Node's View Vector BrokenClément Foucault
Fix regression and remove duplicated computation.
2022-06-02Merge branch 'blender-v3.2-release'Clément Foucault
2022-06-02Fix T98538 EEVEE: Geometry input node breaks with Displacement TextureClément Foucault
This was due to older drivers not honoring varying attributes shadowing by local variables. Renaming the input argument fixes the issue.
2022-05-23Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-23Fix Eevee blackbody wrong with non-default scene linear color spaceBrecht Van Lommel
* Port over new code tables from Cycles * Convert Rec.709 to scene linear for lookup table. * Move code for wavelength and blackbody to IMB so they can access the required transforms, which are not in blenlib. * Remove clamping from blackbody shader to bypass the texture read. Since it's variable now easiest to just always read from the texture than pass additional parameters. * Fold XYZ to RGB conversion into the wavelength table. Ref T68926
2022-05-23EEVEE: Fix unreported broken normal map node modesClément Foucault
A compilation error was making it impossible to use normal map modes other than tangent.
2022-05-23EEVEE: Fix unreported broken normal map node modesClément Foucault
A compilation error was making it impossible to use normal map modes other than tangent.
2022-05-10Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-10Eevee: Fix GLSL compilation error.Jeroen Bakker
Introduced by {35594f4b92fa4cbb5b848f447b7a3323e572b676}. Some platforms do not support temp variables to be used as inout parameter. Detected on Mac with Intel iGPU.
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 T97983 EEVEE: Tangent Normal of Curves info behaves differently in EeveeClément Foucault
Curve tangent was correctly mistaken with curve normal. This patch fixes the name of the output in the glsl function and make curve attributes more explicit (with `curve_` prefix). This also improve the normal computation by making it per pixel to match cycles. Also ports the changes to eevee-next.
2022-05-06EEVEE: Refactor curve nodesOmar Emara
This patches rewrites the GPU shaders of curve nodes for easier future development. This is a non-functional change. The new code avoids code duplication by moving common code into BKE curve mapping functions. It also avoids ambiguous data embedding into the gradient vectors that are passed to vectors and reduces the size of uniforms uploaded to the shader by avoiding redundancies. This is needed in preparation for the viewport compositor, which will utilize and extend this implementation. Reviewed By: fclem Differential Revision: https://developer.blender.org/D14689
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-04Nodes: Add general Combine/Separate Color nodesHallam Roberts
Inspired by D12936 and D12929, this patch adds general purpose "Combine Color" and "Separate Color" nodes to Geometry, Compositor, Shader and Texture nodes. - Within Geometry Nodes, it replaces the existing "Combine RGB" and "Separate RGB" nodes. - Within Compositor Nodes, it replaces the existing "Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA" nodes. - Within Texture Nodes, it replaces the existing "Combine RGBA" and "Separate RGBA" nodes. - Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and "Separate RGB/HSV" nodes. Python addons have not been updated to the new nodes yet. **New shader code** In node_color.h, color.h and gpu_shader_material_color_util.glsl, missing methods hsl_to_rgb and rgb_to_hsl are added by directly converting existing C code. They always produce the same result. **Old code** As requested by T96219, old nodes still exist but are not displayed in the add menu. This means Python scripts can still create them as usual. Otherwise, versioning replaces the old nodes with the new nodes when opening .blend files. Differential Revision: https://developer.blender.org/D14034
2022-05-04Fix T97827: material preview not displaying texturesKévin Dietrich
Caused by rB281bcc1c1dd6 which did not properly made use of `vec4` for UVs which are now loaded as attributes.
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-04-20Cleanup: clang-formatCampbell Barton
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-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 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-03-22Cleanup: make format and fix warningJacques Lucke
2022-03-22Metal: Make GLSL shader source MSL compliant alsoJason Fielder
Metal shading language follows the C++ 14 standard and in some cases requires a greater level of explicitness than GLSL. There are also some small language differences: - Explicit type-casts (C++ requirements) - Explicit constant values (C++ requirements, e.g. floating point values using 0.0 instead of 0). - Metal/OpenGL compatibility paths - GLSL Function prototypes - Explicit accessors for vector types when sampling textures. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14378
2022-03-11Cleanup: fix source typos homogenous->homogeneousBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14306
2022-03-07Shader Nodes: add Alpha output to Object Info nodeEthan-Hall
An alpha component can be specified for an object's color. This adds an alpha socket to the object info shader node allowing for the alpha component of the object's color to be accessed in the shader editor. Differential Revision: https://developer.blender.org/D14141
2022-02-08Eevee: support the no-op Bump node optimization like in Cycles.Alexander Gavrilov
A Bump node without a Height input is meaningless and does nothing. As such, it is available as an old workaround that allows making Node Group inputs that default to normal when not connected, by routing via a no-op Bump node before doing math. Cycles specifically recognizes this use case and either bypasses the node, or converts it into a Geometry Normal node, but Eevee was still evaluating it as usual. That incurred performance cost, and also normalized the vector unlike Cycles. This implements the same bypass logic for Eevee. Since I'm not sure if it's possible to totally remove the node at this stage, it emits a no-op function call to copy the input vector. Differential Revision: https://developer.blender.org/D14045
2022-01-31Cleanup: use our own conventions for tags in commentsCampbell Barton
2022-01-25Cycles: add Point Info nodeBrecht Van Lommel
With (center) position, radius and random value outputs. Eevee does not yet support rendering point clouds, but an untested implementation of this node was added for when it does. Ref T92573
2022-01-18Fix T95003: Shader issue using voronoi noise.Jeroen Bakker
Cause of the issue isn't that clear, but the NVIDIA GLSL compiler complained that it couldn't find an overloaded function when the second parameter is an interger. This change fixes it by using a float.
2021-12-14Nodes: Add vector support to Map Range nodeCharlie Jolly
This replaces lost functionality from the old GN Attribute Map Range node. This also adds vector support to the shader version of the node. Notes: This breaks forward compatibility as this node now uses data storage. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D12760
2021-12-10Fix T92036: `Magic Texture` in Volumetric World Shaders render differently ↵William Leeson
with the CPU and GPU When rendering volume surfaces in unbounded worlds the volume stepping can produce large values. If used with a magic texture node the values can results in a Inf float which when used in a sin or cos produces a NaN. To fix this the input values are mapped into the periodic range of the sin and cos functions (-2*PI 2*PI) this stops the possibility of a Inf occurring and thus the NaN. It also improves the accuracy and smoothness of the result due to loss of precision when large values are summed with smaller ones effectively removing the parts of the smaller number (i.e. those in the -2PI to 2PI range) that result in variation of the output of sin and cos. Reviewed By: brecht Maniphest Tasks: T92036 Differential Revision: https://developer.blender.org/D12821
2021-11-02Fix T77681, T92634: noise texture artifacts with high detailBrecht Van Lommel
We run into float precision issues here, clamp the number of octaves to one less, which has little to no visual difference. This was empirically determined to work up to 16 before, but with additional inputs like roughness only 15 appears to work. Also adds misisng clamp for the geometry nodes implementation.
2021-10-13Fix T88766 EEVEE: Missing glossy reflections with Shader to RGB & SSR is active.Clément Foucault
This was due to the shading evaluation being outdated inside the ShaderToRGBA glsl code.
2021-09-30Nodes: Add Float Curve for GN and Shader nodes.Charlie Jolly
Replacement for float curve in legacy Attribute Curve Map node. Float Curve defaults to [0.0-1.0] range. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D12683
2021-09-24Hair Info Length AttributeJeroen Bakker
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair. Reviewed By: #eevee_viewport, brecht Differential Revision: https://developer.blender.org/D10481
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-07-30Cleanup: clarify license and origin of voronoi and dithering codeBrecht Van Lommel
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-04Nodes: Add Multiply Add to Vector Math nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D10808
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-21Eevee Wavelength Node SupportIyad Ahmed
This patch adds wavelength node support to Eevee, similar to how Eevee Blackbody node works, thus it is a little off from Cycles. Reviewed By: #eevee_viewport, fclem, brecht Differential Revision: https://developer.blender.org/D11326
2021-05-19EEVEE: Subsurface Node: Fix inverted texture blur inputClément Foucault
Fixes T86097 EEVEE Subsurface Node give blurry edges
2021-05-19EEVEE: Geometry info -> tangent: Make consistent with Cycles for hairMikhail Matrosov
Changes output for geometry info node in Eevee to be consistent with Cycles (w/o osl) Before this patch Eevee outputs Z-tangent even for hair. This patch changes it to output hair tangent (growth direction). Hair tangent is impossible to derive otherwise from normal or view direction. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D10841
2021-04-08Fix T87107 EEVEE: Principled BSDF doesn't handle negative specularClément Foucault
Negative speculars are evil.
2021-03-23Nodes: Add Refract and Faceforward functions to Vector Maths nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute Based on outdated refract patch D6619 by @cubic_sloth `refract` and `faceforward` are standard functions in GLSL, OSL and Godot shader languages. Adding these functions provides Blender shader artists access to these standard functions. Reviewed By: brecht Differential Revision: https://developer.blender.org/D10622