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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-21 20:25:38 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-22 14:03:03 +0300
commit282516e53eba9bb3aaddd67b2b099fea98bd4c1f (patch)
tree32fc55a41ea26bb4e8237db6924fa78176641760 /intern/cycles/integrator
parent65dbeb1d81bff6c5742eb5f503b59207485041a9 (diff)
Cleanup: refactor float/half conversions for clarity
Diffstat (limited to 'intern/cycles/integrator')
-rw-r--r--intern/cycles/integrator/pass_accessor.cpp2
-rw-r--r--intern/cycles/integrator/pass_accessor_cpu.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp
index 4ef9ce7ef42..1308b03b06c 100644
--- a/intern/cycles/integrator/pass_accessor.cpp
+++ b/intern/cycles/integrator/pass_accessor.cpp
@@ -115,7 +115,7 @@ static void pad_pixels(const BufferParams &buffer_params,
}
if (destination.pixels_half_rgba) {
- const half one = float_to_half(1.0f);
+ const half one = float_to_half_display(1.0f);
half4 *pixel = destination.pixels_half_rgba + destination.offset;
for (size_t i = 0; i < size; i++, pixel++) {
diff --git a/intern/cycles/integrator/pass_accessor_cpu.cpp b/intern/cycles/integrator/pass_accessor_cpu.cpp
index 80908271ff6..e3cb81d31b7 100644
--- a/intern/cycles/integrator/pass_accessor_cpu.cpp
+++ b/intern/cycles/integrator/pass_accessor_cpu.cpp
@@ -148,8 +148,8 @@ inline void PassAccessorCPU::run_get_pass_kernel_processor_half_rgba(
film_apply_pass_pixel_overlays_rgba(kfilm_convert, buffer, pixel_rgba);
- float4_store_half(&pixel->x,
- make_float4(pixel_rgba[0], pixel_rgba[1], pixel_rgba[2], pixel_rgba[3]));
+ *pixel = float4_to_half4_display(
+ make_float4(pixel_rgba[0], pixel_rgba[1], pixel_rgba[2], pixel_rgba[3]));
}
});
}