Browse Source

Fix a "bug" in UV Image introduced while debugging

Godzil 4 years ago
parent
commit
f8aa5cc920
1 changed files with 2 additions and 2 deletions
  1. 2 2
      source/uvpattern/uv_image.h

+ 2 - 2
source/uvpattern/uv_image.h

@@ -32,8 +32,8 @@ public:
 
     Colour uvPatternAt(double u, double v) {
         v = 1 - v;
-        double x = u * (this->image->width/2.0 - 1);
-        double y = v * (this->image->height/2.0 - 1);
+        double x = u * (this->image->width - 1);
+        double y = v * (this->image->height - 1);
 
         Colour ret = this->image->getPixel(round(x), round(y));
         return ret;