diff options
author | Adrian Kummerlaender | 2020-01-09 14:44:43 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2020-01-09 14:44:43 +0100 |
commit | ed54f6f987decbbaefd59eee32326c750a3f2896 (patch) | |
tree | 6e9ca1c5ec3bee6af7da1ea07b41d6aa513d8ab4 | |
parent | fa280a8ed69243b8691e44a068d38c249dbbd3cf (diff) | |
download | firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar.gz firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar.bz2 firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar.lz firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar.xz firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.tar.zst firmament-ed54f6f987decbbaefd59eee32326c750a3f2896.zip |
Replace subscripted vector access
Supported by Intel OpenCL but not by Nvidia
-rw-r--r-- | raymarch.cl | 4 |
1 files 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; |