From ed54f6f987decbbaefd59eee32326c750a3f2896 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 9 Jan 2020 14:44:43 +0100 Subject: Replace subscripted vector access Supported by Intel OpenCL but not by Nvidia --- raymarch.cl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raymarch.cl b/raymarch.cl index 1e88f40..6cde456 100644 --- a/raymarch.cl +++ b/raymarch.cl @@ -117,8 +117,8 @@ double3 scatter(double3 origin, double3 dir, double dist, double3 sun) { mie_depth += mie_h; const double2 light_depth = lightDepth(curr, sun); - const double3 tau = rayleigh_beta * (rayleigh_depth + light_depth[0]) - + mie_beta * (mie_depth + light_depth[1]); + const double3 tau = rayleigh_beta * (rayleigh_depth + light_depth.x) + + mie_beta * (mie_depth + light_depth.y); const double3 attenuation = exp(-tau); rayleigh_sum += attenuation * rayleigh_h; -- cgit v1.2.3