solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit 1a1fdf4ecca6e8b649e279e55d48625e08b2d6e5
parent d4f53f5690703ec5b7f80bfe67c5267211270abb
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 14 Dec 2016 14:31:45 +0100

Fix the ssol_draw function

The indexing of the tile pixel was incorrect

Diffstat:
Msrc/ssol_device.c | 1-
Msrc/ssol_draw.c | 3++-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ssol_device.c b/src/ssol_device.c @@ -41,7 +41,6 @@ log_msg } } - static void device_release(ref_T* ref) { diff --git a/src/ssol_draw.c b/src/ssol_draw.c @@ -91,13 +91,14 @@ draw_tile ipix[1] = morton2D_decode((uint32_t)(mcode>>1)); if(ipix[1] >= size[1]) continue; + pixel = pixels + (ipix[1]*size[0] + ipix[0])*3/*#channels*/; + ipix[0] = ipix[0] + origin[0]; ipix[1] = ipix[1] + origin[1]; samp[0] = ((float)ipix[0] + 0.5f) * pix_sz[0]; samp[1] = ((float)ipix[1] + 0.5f) * pix_sz[1]; camera_ray(cam, samp, org, dir); - pixel = pixels + (ipix[1]*size[0] + ipix[0])*3/*#channels*/; Li(scn, view, org, dir, pixel); }