diff options
Diffstat (limited to 'src/opencl_mesh_kit.hpp')
-rw-r--r-- | src/opencl_mesh_kit.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opencl_mesh_kit.hpp b/src/opencl_mesh_kit.hpp index ee6bfa5..ac3cf46 100644 --- a/src/opencl_mesh_kit.hpp +++ b/src/opencl_mesh_kit.hpp @@ -56,13 +56,13 @@ const char kernel_src_zero_z[]=STRINGIFY( /* calculate uv coordinates of the mesh point [0.0;1.0] */ float u = nx / (float) width; float v = ny / (float) height; - /* calculate centered coordinates [-0.5;0.5] */ - float x = (u*2-1)/2; - float y = (v*2-1)/2; - /* We only use normalized quaterinons here */ - float w = 1.0f; + /* calculate centered normalized coordinates [-1.0;1.0] */ + float x = u*2.0-1.0; + float y = v*2.0-1.0; /* Calculate the desirated value of the mesh point */ float z = 0.0f; + /* We only use normalized quaterinons here */ + float w = 1.0f; /* Write output vertex (centered) */ pos[ny*width+nx] = (float4)(x, y, z, w); } |