Fix a "bug" in UV Image introduced while debugging

This commit is contained in:
Godzil
2020-03-05 15:15:20 +00:00
parent 30db4d7ca1
commit f8aa5cc920

View File

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