Skip to content

Commit b8626a8

Browse files
committed
relativelight bugfix: vertical_offset added twice.
1 parent 63291c1 commit b8626a8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/imageset.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ Vector3f ImageSet::relativeLight(const Vector3f &light3d, int x, int y){
277277
//relative position to the center in cm
278278
float dx = image_width_cm*(x - image_width/2.0f)/image_width;
279279
float dy = image_width_cm*(y - image_height/2.0f)/image_width;
280-
l[0] -= dx/2;
281-
l[1] -= dy/2;
282-
l[2] += vertical_offset;
280+
l[0] -= dx;
281+
l[1] -= dy;
283282
return l;
284283
}
285284

0 commit comments

Comments
 (0)