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-09-22Cleanup: spelling in commentsCampbell Barton
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-08-24Fix T90854: Cycles, normal map fails with applied transformationsKévin Dietrich
Prior to rBb8ecdbcd964a normals were stored both in DeviceScene.tri_vnormal and the float3 attributes buffer. However, the normals in `DeviceScene.tri_vnormal` might have be transformed to world space if the object's transformation was applied, while the data in the float3 attributes buffer were not. This caused shading issues in cases where the objects did have transformation applied, as the math expects the normals to be in object space. To fix this, convert the normals to object space if necessary before applying the normal map. Reviewed By: brecht Maniphest Tasks: T90854 Differential Revision: https://developer.blender.org/D12294
2021-08-19Fix T90776: Cycles normal map node produces artifactsKévin Dietrich
This is caused by a typo in rBb8ecdbcd964a `sd->prim` is the primitive index, but was used to discriminate the primitive type (stored in `sd- >type`).
2021-08-18Cycles: use object coordinates when generated coordinates are missingKévin Dietrich
This modifies the attribute lookup to use object coordinates if no generated coordinates are found on the geometry. This is useful to avoid creating and copying this attribute, thus saving a bit of time and memory. Reviewed By: brecht Differential Revision: https://developer.blender.org/D12238
2021-08-18Cycles: avoid copying vertex normals attribute twice to the devicesKévin Dietrich
Vertex normals are needed for normals maps and therefore are packed and send to the device alongside the other float3 attributes. However, we already pack and send vertex normals through `DeviceScene.tri_vnormal`. This removes the packing of vertex normals from the attributes buffer, and reuses `tri_vnormal` in the kernel for normals lookup for normal maps, which reduces memory usage a bit, and speeds up device updates. This also fixes potential missing normals updates following rB12a06292af86, since the need for vertex normals for normals maps was overlooked. Reviewed By: brecht Differential Revision: https://developer.blender.org/D12237
2021-07-30Cleanup: clarify license and origin of voronoi and dithering codeBrecht Van Lommel
2021-07-14Fix T88088: Cycles and Eevee Vector Rotate node inconsistent with zero axisBrecht Van Lommel
Pass along the unmodified vector in this case.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-24Cleanup: use '#if 0' for commented code-blockCampbell Barton
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-12Fix non-finite tangent in Cycles with missing UV mapSergey Sharybin
Was causing calculation issues later on in the kernel. This change catches the most obvious case: missing attribute. The old code was trying to set tangent to 0, but because it was transformed as a normal it got converted to non-finite value. This change makes it so that no transform is involved and 0 is written directly to the SVM stack. To cover all cases it will require using safe_normalize() in this node and in the normal transform function. This is more involved change from performance point of view, would be nice to verify whether we really want to go this route. I've left asserts in the BSDF allocation functions. Don't have strong connection to them, but think they are handy and are not different from having an assert in the path radiance checks. Differential Revision: https://developer.blender.org/D11235
2021-03-26Cleanup: clang-formatCampbell Barton
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-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-17Cleanup: spellingCampbell Barton
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2020-12-04Cycles: Add support for shader raytracing in OptiXPatrick Mours
Support for the AO and bevel shader nodes requires calling "optixTrace" from within the shading VM, which is only allowed from inlined functions to the raygen program or callables. This patch therefore converts the shading VM to use direct callables to make it work. To prevent performance regressions a separate kernel module is compiled and used for this purpose. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9733
2020-11-20Cycles: Fixed zero sized normals when certain attributes were missing.Stefan Werner
The Normal Map node was falling back to (0, 0, 0) when it was missing the required attributes to calculate a new normal. (0, 0, 0) is not a valid normal and can lead to NaNs when it is normalized later in the shader. Instead, we now return sd->N, the unperturbed surface normal.
2020-10-28Cycles: internal support for alpha output for attribute nodeAlexander Gavrilov
Not exposed in Blender yet. Ref D2057
2020-10-28Cycles: internal support for float4 geometry attributesAlexander Gavrilov
Previously only float3 and byte4 was supported. Ref D2057
2020-10-28Cycles: refactor to split surface and volume attribute lookup moreBrecht Van Lommel
This avoids OpenCL inlining heavy volume interpolation code once for every data type, which could cause a performance regression when we add a float4 data type in the next commit. Ref D2057
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell 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-17Fix T79052: Cycles new sky texture fails with sun size zeroBrecht Van Lommel
Clamp to a minimum angle to avoid precision issues.
2020-07-20Cycles: adjust Sky texture intensity to follow physical unitsBrecht Van Lommel
The sky will appear brighter than before by default. To compensate for this, lower exposure in the Film panel. The default altitude was also changed from 90 to 15 degrees. Patch contributed by Marco with the help of Ryan Jones. Differential Revision: https://developer.blender.org/D8285
2020-07-13Cycles: Change precomputed Sky Texture mapping to prioritize the horizonLukas Stockner
Differential Revision: https://developer.blender.org/D8091
2020-07-13Cycles: Add control for sun intensity in Sky Texture and change altitude to kmLukas Stockner
Differential Revision: https://developer.blender.org/D8091
2020-07-08Fix T78324: Different Sky Texture results between CPU and GPULukas Stockner
The problem here was numerical precision: The code calculates the angle between sun and view direction, and the usual acos(dot(a, b)) approach for that has poor numerical performance for almost parallel angles. As a result, the generally tiny difference between floating point computation between CPU and GPU was enough to make the sun vanish at different radii, causing different results. The new version fixes the difference by making the computation much more robust on both platforms.
2020-07-01Cleanup: spellingCampbell Barton
2020-06-22Cycles: remove __UV__ and __INSTANCING__ as kernel optionsBrecht Van Lommel
The kernel did not work correctly when these were disabled anyway. The optimized BVH traversal for the no instances case was also only used on the CPU, so no longer makes sense to keep. Ref T73778 Depends on D8010 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8011
2020-06-22Cycles: always perform backface culling for curve, remove optionBrecht Van Lommel
The hair BSDFs are already designed to assume this, and disabling backface culling would break them in some cases. Ref T73778 Depends on D8009 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8010
2020-06-17Cycles: Add new Sky Texture method including direct sunlightLukas Stockner
This commit adds a new model to the Sky Texture node, which is based on a method by Nishita et al. and works by basically simulating volumetric scattering in the atmosphere. By making some approximations (such as only considering single scattering), we get a fairly simple and fast simulation code that takes into account Rayleigh and Mie scattering as well as Ozone absorption. This code is used to precompute a 512x128 texture which is then looked up during render time, and is fast enough to allow real-time tweaking in the viewport. Due to the nature of the simulation, it exposes several parameters that allow for lots of flexibility in choosing the look and matching real-world conditions (such as Air/Dust/Ozone density and altitude). Additionally, the same volumetric approach can be used to compute absorption of the direct sunlight, so the model also supports adding direct sunlight. This makes it significantly easier to set up Sun+Sky illumination where the direction, intensity and color of the sun actually matches the sky. In order to support properly sampling the direct sun component, the commit also adds logic for sampling a specific area to the kernel light sampling code. This is combined with portal and background map sampling using MIS. This sampling logic works for the common case of having one Sky texture going into the Background shader, but if a custom input to the Vector node is used or if there are multiple Sky textures, it falls back to using only background map sampling (while automatically setting the resolution to 4096x2048 if auto resolution is used). More infos and preview can be found here: https://docs.google.com/document/d/1gQta0ygFWXTrl5Pmvl_nZRgUw0mWg0FJeRuNKS36m08/view Underlying model, implementation and documentation by Marco (@nacioss). Improvements, cleanup and sun sampling by @lukasstockner. Differential Revision: https://developer.blender.org/D7896
2020-05-15Cycles: Refactor microfacet BSDFs to remove separate anisotropy codeLukas Stockner
Since the sampling and evaluation functions handle both cases anyways, there's not really a point for keeping the distinction in the kernel, so we might as well cut down the number of CLOSURE_BSDF_MICROFACETs a bit. Differential Revision: https://developer.blender.org/D7736
2020-04-30Fix T75895: Unable to Compile Cycles on NAVI/LinuxJeroen Bakker
This patch will add some compiler hints to break unrolling in the nestled for loops of the voronoi node. Reviewed by: Brecht van Lommel Differential Revision: https://developer.blender.org/D7574
2020-04-09Shading: add Roughness input to Noise and Wave texture nodesBartosz Moniewski
Currently in fractal_noise functions, each subsequent octave doubles the frequency and reduces the amplitude by half. This patch introduces Roughness input to Noise and Wave nodes. This multiplier determines how quickly the amplitudes of the subsequent octaves decrease. Value of 0.5 will be the default, generating identical noise we had before. Values above 0.5 will increase influence of each octave resulting in more "rough" noise, most interesting pattern changes happen there. Values below 0.5 will result in more "smooth" noise. Differential Revision: https://developer.blender.org/D7065
2020-04-01Cycles: AVX implantation of Perlin noise.OmarSquircleArt
This patch adds an AVX implementation of Perlin noise in Cycles. An avxi type was also added as a utility based on the respective type in Intel Embree. Only 3D and 4D noise were implemented, there is no benefit for utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation function was used in the AVX implementation because there is no benefit from using AVX in interpolating the last three dimensions. Differential Revision: https://developer.blender.org/D6680
2020-03-27Fix Optix build error after recent changesDaniel Santana
Differential Revision: https://developer.blender.org/D7253
2020-03-27Cleanup: Silence uninitialized variable warningCharlie Jolly
2020-03-24Cycles: slightly improve OpenCL performance by reordering SVM enum valuesBrecht Van Lommel
Ref T71479
2020-03-24Cycles: work around OpenCL performance regression after AOVs and vector rotateBrecht Van Lommel
We appear to be hitting some limit where adding any amount of code causes a significant performance regression, no matter what it does. To work around that a new node level was added. Ref T71479
2020-03-24Cleanup: remove unused Cycles kernel feature flags, replace by node levelsBrecht Van Lommel
2020-03-20Fix T74345: missing albedo for Cycles principled hair BSDFBrecht Van Lommel
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cycles: support for different 3D transform per volume gridBrecht Van Lommel
This is not yet fully supported by automatic volume bounds but works fine in most cases that will have mostly matching bounds. Ref T73201
2020-03-11Fix Cycles incorrect result when compressing some 8 bit log colorspace imagesBrecht Van Lommel
Don't clamp and do premultiply after color space conversion.
2020-03-02Shading: Add invert option to Vector Rotate NodeCharlie Jolly
Checkbox to invert rotation angle, suggested by @simonthommes Differential Revision: https://developer.blender.org/D6932
2020-02-27Fix T74262: Cycles OpenCL error on some devices after recent changesBrecht Van Lommel