Update the OSL script for the "Geometry" node to follow the correct
Tangent code path when working with point clouds.
There should be no functional change for the end user since the correct
code path was already taken by accident.
Pull Request: https://projects.blender.org/blender/blender/pulls/113472
Cycles implements the "Taming the Shadow Terminator" paper by Matt Jen-Yuan
Chiang to solve shadow terminator issues when a bump map is applied, as well
as similar approach for the glossy reflection to ensure ray does not get
reflected to inside of the object.
This correction term is applied unconditionally, which makes it harder to have
full control over shading via normals for stylistic reasons.
This change exposes this corrective term as an option called "Bump Map
Correction" which is available in the shader settings next to the
"Transparent Shadows".
The reason to make it per-shader rather than per-object is to allow flexibility
of a control: it is possible that an object has multiple shaders attached to it,
and only some of them used for bump mapping. Another, and possibly stronger
reason to have it per-shader is ease of assets control: shader brings settings
which are needed for its proper behavior. So if material at some point
decides to take over normals, artists would not need to update settings on
every asset which uses that material.
The option is enabled by default, so there is no changes for existing setups.
Pull Request: https://projects.blender.org/blender/blender/pulls/113480
CYCLES_ONEAPI_SPIR64_GEN_DEVICES -> CYCLES_ONEAPI_INTEL_BINARIES_ARCH
so it's more aligned with the name for the other backends, such as
CYCLES_CUDA_BINARIES_ARCH.
Update the Glass BSDF to internally use Generalized Schlick fresnel.
This allows for easier expansion of certain features in the future.
There should be no functional change from the users perspective.
Pull Request: https://projects.blender.org/blender/blender/pulls/112701
Speckles and missing lights were experienced in scenes with Nishita Sky
Texture and a Sun Size smaller than 1.5°, such as in Lone Monk and Attic
scenes.
We previously worked around these by using a more precise
software implementation of cosine.
After recent changes in Cycles, it turns out this workaround isn't
currently needed.
The solid angle computation for the sampling/PDF code was running into
cancellation issues for small solid angles.
Reformulating the terms using asin() instead avoids this.
This PR fixes T39823, the sole failing unit test when running with MetalRT. It does so by implementing and binding a missing intersection handler (`__anyhit__cycles_metalrt_volume_test_tri`) which is required for `scene_intersect_volume` (as used by `integrator_volume_stack_update_for_subsurface`) to work as intended. This scene exposed the error as it uses subsurface scattering on a sphere which is intersected by volume.
Pull Request: https://projects.blender.org/blender/blender/pulls/112876
This keeps the behavior similar to the Disney BRDF, where 0.5
is neutral and lower/higher values respectively decrease/increase
the dielectric specular. But it's more correct in that it's not
an arbitrary scale on Fresnel, but rather adjusting the IOR.
Ref #99447
Ref #112848
Pull Request: https://projects.blender.org/blender/blender/pulls/112552
since the color is applied both at entry and exit, using the square root
of the color would make the perceived color closer to the desired one.
This also makes the transition smoother when changing the `Transmission`
value in the UI, and matches the behaviour of EEVEE.
Now that there are different Fresnel types and the reflectance can be tinted,
it is better to sample based on the actually used Fresnel type, instead of
the original Fresnel. This also avoids computing Fresnel multiple times.
Pull Request: https://projects.blender.org/blender/blender/pulls/112158
This was causing a warning when using OSL, since the OSL implementation
didn't implement the input.
Since the socket isn't really implemented on the Blender side anyways,
just get rid of it.
Also, the SVM code uses the shading normal while OSL used the geometric normal.