summaryrefslogtreecommitdiffstats
path: root/src/kernels/forwardproject.cl
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernels/forwardproject.cl')
-rw-r--r--src/kernels/forwardproject.cl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernels/forwardproject.cl b/src/kernels/forwardproject.cl
index 18a8019..89faabd 100644
--- a/src/kernels/forwardproject.cl
+++ b/src/kernels/forwardproject.cl
@@ -19,7 +19,7 @@
constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE |
CLK_ADDRESS_CLAMP |
- CLK_FILTER_LINEAR;
+ CLK_FILTER_NEAREST;
kernel void
forwardproject(read_only image2d_t slice,
@@ -37,10 +37,10 @@ forwardproject(read_only image2d_t slice,
/* positive/negative distance from detector center */
const float d = idx - axis_pos + 0.5f;
/* length of the cut through the circle */
- const float l = sqrt(4.0f*r*r - 4.0f*d*d);
+ const float l = sqrt(8.0f*r*r - 4.0f*d*d);
/* vector in detector direction */
- float2 D = (float2) (cos(angle), sin(angle));
+ float2 D = (float2) (cos(angle), -sin(angle));
D = normalize(D);
/* vector perpendicular to the detector */