Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
Pass along the unmodified vector in this case.
|
|
|
|
|
|
|
|
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
|
|
Includes fixes to misspelled function names.
Ref D11280
|
|
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
|
|
|
|
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
|
|
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
|
|
|
|
|
|
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
|
|
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.
|
|
Not exposed in Blender yet.
Ref D2057
|
|
Previously only float3 and byte4 was supported.
Ref D2057
|
|
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
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
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
|
|
Clamp to a minimum angle to avoid precision issues.
|
|
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
|
|
Differential Revision: https://developer.blender.org/D8091
|
|
Differential Revision: https://developer.blender.org/D8091
|
|
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.
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Differential Revision: https://developer.blender.org/D7253
|
|
|
|
Ref T71479
|
|
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
|
|
|
|
|
|
|
|
This is not yet fully supported by automatic volume bounds but works fine in
most cases that will have mostly matching bounds.
Ref T73201
|
|
Don't clamp and do premultiply after color space conversion.
|
|
Checkbox to invert rotation angle, suggested by @simonthommes
Differential Revision: https://developer.blender.org/D6932
|
|
|
|
This simplifies compositors setups and will be consistent with Eevee render
passes from D6331. There's a continuum between these passes and it's not clear
there is much advantage to having them available separately.
Differential Revision: https://developer.blender.org/D6848
|
|
Remove additional Euler modes for the time being, not working as intended, will add back if there is a need.
|
|
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods.
Reviewed By: #cycles, brecht
Differential Revision: https://developer.blender.org/D3789
|
|
* Direction mode X, Y and Z to align with axes rather than diagonal or
spherical as previously. X is the new default, existing files will
use diagonal or spherical for compatibility.
* Phase offset to offset the wave along its direction, for purposes like
animation and distortion.
https://developer.blender.org/D6382
|
|
|