From 0704f62924ab5e09e1fdd2ffbbe9bf7a6d95c9f9 Mon Sep 17 00:00:00 2001 From: Radu Serban Date: Sun, 8 Sep 2024 21:36:08 +0200 Subject: [PATCH] Fix argument type for std::pow --- src/chrono_sensor/optix/shaders/material_shaders.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chrono_sensor/optix/shaders/material_shaders.cu b/src/chrono_sensor/optix/shaders/material_shaders.cu index a0fa823f04..93b76b2166 100644 --- a/src/chrono_sensor/optix/shaders/material_shaders.cu +++ b/src/chrono_sensor/optix/shaders/material_shaders.cu @@ -1008,7 +1008,7 @@ static __device__ inline void CameraHapkeShader(PerRayData_camera* prd_camera, float B_C = 0.0f; if (cos_g < 1.0f) - B_C = (1 + (1 - exp(-tan_ghalf_per_hC)) / tan_ghalf_per_hC) / (2 * pow(1 + tan_ghalf_per_hC, 2)); + B_C = (1 + (1 - exp(-tan_ghalf_per_hC)) / tan_ghalf_per_hC) / (2 * pow(1 + tan_ghalf_per_hC, 2.0f)); else if (cos_g == 1) B_C = 1;