forked from bartvdbraak/blender
Merge branch 'blender-v2.93-release'
This commit is contained in:
commit
2e750a42a1
@ -57,6 +57,8 @@ ccl_device ccl_addr_space void *closure_alloc_extra(ShaderData *sd, int size)
|
|||||||
|
|
||||||
ccl_device_inline ShaderClosure *bsdf_alloc(ShaderData *sd, int size, float3 weight)
|
ccl_device_inline ShaderClosure *bsdf_alloc(ShaderData *sd, int size, float3 weight)
|
||||||
{
|
{
|
||||||
|
kernel_assert(isfinite3_safe(weight));
|
||||||
|
|
||||||
const float sample_weight = fabsf(average(weight));
|
const float sample_weight = fabsf(average(weight));
|
||||||
|
|
||||||
/* Use comparison this way to help dealing with non-finite weight: if the average is not finite
|
/* Use comparison this way to help dealing with non-finite weight: if the average is not finite
|
||||||
@ -81,6 +83,8 @@ ccl_device_inline ShaderClosure *bsdf_alloc_osl(ShaderData *sd,
|
|||||||
float3 weight,
|
float3 weight,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
|
kernel_assert(isfinite3_safe(weight));
|
||||||
|
|
||||||
const float sample_weight = fabsf(average(weight));
|
const float sample_weight = fabsf(average(weight));
|
||||||
|
|
||||||
/* Use comparison this way to help dealing with non-finite weight: if the average is not finite
|
/* Use comparison this way to help dealing with non-finite weight: if the average is not finite
|
||||||
|
@ -370,11 +370,14 @@ ccl_device void svm_node_tangent(KernelGlobals *kg, ShaderData *sd, float *stack
|
|||||||
|
|
||||||
if (direction_type == NODE_TANGENT_UVMAP) {
|
if (direction_type == NODE_TANGENT_UVMAP) {
|
||||||
/* UV map */
|
/* UV map */
|
||||||
if (desc.offset == ATTR_STD_NOT_FOUND)
|
if (desc.offset == ATTR_STD_NOT_FOUND) {
|
||||||
tangent = make_float3(0.0f, 0.0f, 0.0f);
|
stack_store_float3(stack, tangent_offset, zero_float3());
|
||||||
else
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
tangent = attribute_value;
|
tangent = attribute_value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
/* radial */
|
/* radial */
|
||||||
float3 generated;
|
float3 generated;
|
||||||
|
Loading…
Reference in New Issue
Block a user