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
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/kernel_bake.h')
-rw-r--r--intern/cycles/kernel/kernel_bake.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index ded914c05d7..bdedf0c20a8 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -23,7 +23,7 @@ ccl_device_noinline void compute_light_pass(
{
kernel_assert(kernel_data.film.use_light_pass);
- float3 throughput = make_float3(1.0f, 1.0f, 1.0f);
+ float3 throughput = one_float3();
/* Emission and indirect shader data memory used by various functions. */
ShaderDataTinyStorage emission_sd_storage;
@@ -176,7 +176,7 @@ ccl_device_inline float3 kernel_bake_shader_bsdf(KernelGlobals *kg,
return shader_bsdf_transmission(kg, sd);
default:
kernel_assert(!"Unknown bake type passed to BSDF evaluate");
- return make_float3(0.0f, 0.0f, 0.0f);
+ return zero_float3();
}
}
@@ -192,12 +192,12 @@ ccl_device float3 kernel_bake_evaluate_direct_indirect(KernelGlobals *kg,
const bool is_color = (pass_filter & BAKE_FILTER_COLOR) != 0;
const bool is_direct = (pass_filter & BAKE_FILTER_DIRECT) != 0;
const bool is_indirect = (pass_filter & BAKE_FILTER_INDIRECT) != 0;
- float3 out = make_float3(0.0f, 0.0f, 0.0f);
+ float3 out = zero_float3();
if (is_color) {
if (is_direct || is_indirect) {
/* Leave direct and diffuse channel colored. */
- color = make_float3(1.0f, 1.0f, 1.0f);
+ color = one_float3();
}
else {
/* surface color of the pass only */
@@ -315,7 +315,7 @@ ccl_device void kernel_bake_evaluate(
if (kernel_data.bake.pass_filter & ~BAKE_FILTER_COLOR)
compute_light_pass(kg, &sd, &L, rng_hash, pass_filter, sample);
- float3 out = make_float3(0.0f, 0.0f, 0.0f);
+ float3 out = zero_float3();
ShaderEvalType type = (ShaderEvalType)kernel_data.bake.type;
switch (type) {
@@ -409,7 +409,7 @@ ccl_device void kernel_bake_evaluate(
/* setup ray */
Ray ray;
- ray.P = make_float3(0.0f, 0.0f, 0.0f);
+ ray.P = zero_float3();
ray.D = normalize(P);
ray.t = 0.0f;
# ifdef __CAMERA_MOTION__
@@ -486,7 +486,7 @@ ccl_device void kernel_background_evaluate(KernelGlobals *kg,
float u = __uint_as_float(in.x);
float v = __uint_as_float(in.y);
- ray.P = make_float3(0.0f, 0.0f, 0.0f);
+ ray.P = zero_float3();
ray.D = equirectangular_to_direction(u, v);
ray.t = 0.0f;
#ifdef __CAMERA_MOTION__