[Bf-blender-cvs] [372dff8] cycles_camera_nodes: Silence double promotion error/warnings

Dalai Felinto noreply at git.blender.org
Tue Sep 22 00:57:50 CEST 2015


Commit: 372dff8d1dc7e24d4b2cd37de245588ecfce8bfa
Author: Dalai Felinto
Date:   Mon Sep 21 18:20:30 2015 -0300
Branches: cycles_camera_nodes
https://developer.blender.org/rB372dff8d1dc7e24d4b2cd37de245588ecfce8bfa

Silence double promotion error/warnings

===================================================================

M	intern/cycles/util/util_distort.h

===================================================================

diff --git a/intern/cycles/util/util_distort.h b/intern/cycles/util/util_distort.h
index 6f8d4f2..174b918 100644
--- a/intern/cycles/util/util_distort.h
+++ b/intern/cycles/util/util_distort.h
@@ -65,8 +65,8 @@ ccl_device void util_invert_polynomial_distortion(const float2 image,
 	                                       image.x, image.y,
 	                                       &normalized_x,
 	                                       &normalized_y);
-	result->x = normalized_x * focal_length + principal_point.x;
-	result->y = normalized_y * focal_length + principal_point.y;
+	result->x = normalized_x * (double)focal_length + (double)principal_point.x;
+	result->y = normalized_y * (double)focal_length + (double)principal_point.y;
 #else
 	*result = image;
 #endif




More information about the Bf-blender-cvs mailing list