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
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
2021-03-14EEVEE: Specular Occlusion: Avoid overdarkening on smooth surfacesClément Foucault
Accumulate error caused by the low amount of integration slices and correct it for the low roughness surfaces. This increases light leak but it is less distracting than dark fringe everywhere.
2021-03-13EEVEE: Fix wrong sss component being affected by alphaClément Foucault
This fixes NaNs / blown up values when using alpha-hashed transparency or alpha clip with SSS.
2021-03-08EEVEE: Ambient Occlusion: Add sample parameter support for the AO nodeClément Foucault
The actual sample count is rounded up to a multiple of 4 because we sample 4 horizons directions. Changing this setting forces the shader to recompile (because using a GPU_constant).
2021-03-01Fix T84658: Anisotropic BSDF - most modes not using Screen SpacePhilipp Oeser
Reflection Anisotropic is not really supported in Eevee, but since code looks like it is just intended to make it behave like glossy, it should function like it too. Seems like the internal calling from `node_bsdf_glossy` from `node_bsdf_anisotropic` has swapped arguments. Also: ssr_id is available for SH_NODE_BSDF_ANISOTROPIC as well (see `ntree_tag_bsdf_cb`), so why not use it? Maniphest Tasks: T84658 Differential Revision: https://developer.blender.org/D10547
2021-02-24Fix T85939: Eevee Specular BSDF shader compile errorJeroen Bakker
Introduced by 7f7e6830991b.
2021-02-22Fix Principled BSDF specular color for black base colorPascal Schön
Specular color is set to black instead of white inside the Principled BSDF when the base color is set to fully black. This is contradictory to the sample code of the Disney BRDF in BRDF Explorer. This patch aligns both implementations. Differential Revision: https://developer.blender.org/D10448
2021-02-21Cleanup: EEVEE: change cameraVec macro to cameraVec(P)Clément Foucault
This makes is clearer and avoid having to setup worldPosition if shader is not a material shader.
2021-02-21EEVEE: Ambient Occlusion Node: Support inverted and distance parametersClément Foucault
This adds an approximation of inverted AO by reversing the max horizon search (becoming a min horizon). The horizons are correctly clamped in the reverse direction to the shading and geometric normals. The arc integration is untouched as it seems to be symetrical. The limitation of this technique is that since it is still screen-space AO you don't get other hidden surfaces occlusion. This is more problematic in the case of inverted AO than for normal AO but it's better than no support AO. Support of distance parameter was easy thanks to recent AO refactor.
2021-02-21EEVEE: Ambient Occlusion: RefactorClément Foucault
- Fix noise/banding artifact on distant geometry. - Fix overshadowing on un-occluded surfaces at grazing angle producing "fresnel" like shadowing. Some of it still appears but this is caused to the low number of horizons per pixel. - Improve performance by using a fixed number of samples and fixing the sampling area size. A better sampling pattern is planned to recover the lost precision on large AO radius. - Improved normal reconstruction for the AO pass. - Improve Bent Normal reconstruction resulting in less faceted look on smoothed geometry. - Add Thickness heuristic to avoid overshadowing of thin objects. Factor is currently hardcoded. - Add bent normal support to Glossy reflections. - Change Glossy occlusion to give less light leaks from lightprobes. It can overshadow on smooth surface but this should be mitigated by using SSR. - Use Bent Normal for rough Glossy surfaces. - Occlusion is now correctly evaluated for each BSDF. However this does make everything slower. This is mitigated by the fact the search is a lot faster than before.
2021-02-13EEVEE: Update LUT GGX generation shaderClément Foucault
This modifies the principled BSDF and the Glass BSDF which now have better fit to multiscatter GGX. Code to generate the LUT have been updated and can run at runtime. The refraction LUT has been changed to have the critical angle always centered around one pixel so that interpolation can be mitigated. Offline LUT data will be updated in another commit This simplify the BTDF retreival removing the manual clean cut at low roughness. This maximize the precision of the LUT by scalling the sides by the critical angle. I also touched the ior > 1.0 approximation to be smoother. Also incluse some cleanup of bsdf_sampling.glsl
2021-02-13EEVEE: Refactor closure_lit_lib.glslClément Foucault
This refactor was needed for some reasons: - closure_lit_lib.glsl was unreadable and could not be easily extended to use new features. - It was generating ~5K LOC for any shader. Slowing down compilation. - Some calculations were incorrect and BSDF/Closure code had lots of workaround/hacks. What this refactor does: - Add some macros to define the light object loops / eval. - Clear separation between each closures which now have separate files. Each closure implements the eval functions. - Make principled BSDF a bit more correct in some cases (specular coloring, mix between glass and opaque). - The BSDF term are applied outside of the eval function and on the whole lighting (was separated for lights before). - Make light iteration last to avoid carrying more data than needed. - Makes sure that all inputs are within correct ranges before evaluating the closures (use `safe_normalize` on normals). - Making each BSDF isolated means that we might carry duplicated data (normals for instance) but this should be optimized by compilers. - Makes Translucent BSDF its own closure type to avoid having to disable raytraced shadows using hacks. - Separate transmission roughness is now working on Principled BSDF. - Makes principled shader variations using constants. Removing a lot of duplicated code. This needed `const` keyword detection in `gpu_material_library.c`. - SSR/SSS masking and data loading is a bit more consistent and defined outside of closure eval. The loading functions will act as accumulator if the lighting is not to be separated. - SSR pass now do a full deferred lighting evaluation, including lights, in order to avoid interference with the closure eval code. However, it seems that the cost of having a global SSR toggle uniform is making the surface shader more expensive (which is already the case, by the way). - Principle fully black specular tint now returns black instead of white. - This fixed some artifact issue on my AMD computer on normal surfaces (which might have been some uninitialized variables). - This touched the Ambient Occlusion because it needs to be evaluated for each closure. But to avoid the cost of this, we use another approach to just pass the result of the occlusion on interpolated normals and modify it using the bent normal for each Closure. This tends to reduce shadowing. I'm still looking into improving this but this is out of the scope of this patch. - Performance might be a bit worse with this patch since it is more oriented towards code modularity. But not by a lot. Render tests needs to be updated after this. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D10390 # Conflicts: # source/blender/draw/engines/eevee/eevee_shaders.c # source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl # source/blender/draw/intern/shaders/common_math_lib.glsl
2020-12-18Fix T83494: Eevee clamp node incorrect when min > max.Jeroen Bakker
In glsl the clamp function has undefined behavior when min > max. For the clamp node this resulted in differences between cycles and eevee. This patch adds the expected implementation for minmax. The old clamp function is still used in cases where we know for certain that the input values are correct (math node clamp option). GPU uses optimized code and silicon in these cases.
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-11-04Merge branch 'blender-v2.91-release'Richard Antalik
2020-11-04Fix T82385 EEVEE: Alpha Clip shadows actually using Alpha Hashed shadowsClément Foucault
The shadow path was not using the alpha threshold.
2020-11-04Cleanup: make formatAaron Carlisle
2020-11-03Materials: support true float4 attributes in the Attribute node.Alexander Gavrilov
Add a new Alpha socket to the Attribute node that outputs the fourth component of the attribute. Currently the only such attribute is vertex color, but there may be more in the future. If the attribute has no alpha channel, the expected value is 1. The Cycles code is already refactored and committed by Brecht. Ref D2057
2020-10-22EEVEE: Principle BSDF: Use multi-scatter switch for the glass variantClément Foucault
This avoid strange discrepency between the general purpose variant and the specialized glass variant which did not have a way to turn multi-scatter off.
2020-10-20EEVEE: ShaderToRGB alpha inversedJeroen Bakker
The alpha out socket output the average transmittance, not the alpha. This patch will convert the transmittance to alpha. Found during research of T80919; Issue introduced when `Closure.opacity` was migrated to `Closure.transmittance`. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9010
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-19EEVEE: Fix Missing GGX multi-scattering on Glass BSDFClément Foucault
Oversight that should have been in rB6f3c279d9e70
2020-09-19EEVEE: Add support for GGX Multi-scatterClément Foucault
Based on http://jcgt.org/published/0008/01/03/ This is a simple trick that does *not* have a huge performance impact but does work pretty well. It just modifies the Fresnel term to account for the multibounce energy loss (coloration). However this makes the shader variations count double. To avoid this we use a uniform and pass the multiscatter use flag inside the sign of f90. This is a bit hacky but avoids many code duplication. This uses the simplification proposed by McAuley in A Journey Through Implementing Multiscattering BRDFs and Area Lights This does not handle area light differently than the IBL case but that's already an issue in current implementation. This is related to T68460. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8912
2020-09-19Fix T79557 EEVEE: Normalize in vector math node is not null vector safeClément Foucault
This add basic null safe handling for this operation.
2020-09-18EEVEE: Fixed Compilation ErrorJeroen Bakker
Regression from {b248ec97769f}. A new parameter was introduced, but the stub shader macros still had the old number of parametes. This change adds a new dummy parameter to the stub macros.
2020-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971
2020-09-05Cleanup: clang-formatCampbell Barton
2020-09-03Fix T79803: Wrong Distance To Edge 1D VoronoiOmarSquircleArt
The current 1D Voronoi implementation for the Distance to Edge option computes the distance to the cells instead. This patch fixes that and compute the distance to the edge. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D8634
2020-08-18Fix T79568 EEVEE: Film transparent not workingClément Foucault
Since world shader use the same standard output and are considered opaque, we need to set alpha as holdout.
2020-07-30EEVEE: GLSL refactor/cleanupClément Foucault
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code complexity and duplication. - split bsdf_common_lib.glsl into multiple sub library which are now shared with other engines. - the surface shader code is now more organised and have its own files. - change default world to use a material nodetree and make lookdev shader more clear. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8306
2020-07-15EEVEE: Fix undefined behavior in world outputClément Foucault
2020-07-13EEVEE: Fix sky zenith bugSzymon Ulatowski
Careless use of acos() in spherical coordinates transformation was deteriorating the precision near zenith (and nadir) and producing glitchy pixels (best seen in longer focal lengths). Reviewed By: fclem Differential Revision: https://developer.blender.org/D8266
2020-07-09EEVEE: Implement the missing Sky textureSzymon Ulatowski
I'm not sure if the Sky was deliberately left out or was just waiting for a better moment, but so many I was disappointed that Sky in EEVEE is completely white. There are already 2 implementations (osl and gpu) so this is the third one. Looking at other cases it seems that we are not supposed to share sources between cycles and the rest? So the new util_sky_model files are just copies of what is already in cycles, except that the data file uses the RGB variant of the Hosek/Wilkie model, because we output RGB anyway (but can be easily changed to XYZ if desired - the results are nearly identical). I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I wanted to use mat3 but it does not work). Also, should I cache the sky model data between renders if the parameters do not change? Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D7108
2020-07-02Fix T77686: EEVEE environment pass with film transparencyJeroen Bakker
When the film is set to transparent the environment pass should still be rendered solid. otherwise it renders black. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8046
2020-06-30EEVEE: Fix undefined behavior when using BSDF nodes inside volume shadersClément Foucault
This should fix T76171 Eevee bsdf shaders glitches
2020-06-03Cleanup: GPUMaterilal: Texture Node: Remove unused functionsClément Foucault