From c8b28cc8554f294fdf6bec0dc48a19f9c90eb030 Mon Sep 17 00:00:00 2001 From: Fabio Pellacini Date: Fri, 12 Jan 2024 22:53:39 +0100 Subject: [PATCH] updated --- libs/yocto/yocto_diagram.cpp | 4 ++-- libs/yocto/yocto_sceneio.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/yocto/yocto_diagram.cpp b/libs/yocto/yocto_diagram.cpp index 4317926dc..55efe995d 100644 --- a/libs/yocto/yocto_diagram.cpp +++ b/libs/yocto/yocto_diagram.cpp @@ -91,7 +91,7 @@ static shape_data make_dquads( shape.positions[j * (steps.x + 1) + i] = { (2 * uv.x - 1) * scale.x, (2 * uv.y - 1) * scale.y, 0}; shape.normals[j * (steps.x + 1) + i] = {0, 0, 1}; - shape.texcoords[j * (steps.x + 1) + i] = vec2f{uv.x, 1 - uv.y} * uvscale; + shape.texcoords[j * (steps.x + 1) + i] = vec2f{uv.x, uv.y} * uvscale; } } @@ -1678,7 +1678,7 @@ static shape_data make_text_shape(const string& text, const vec3f& offset, if (offset.y < 0) p.y += -height + offset_.y * offset.y; if (offset.z > 0) p.z += offset.z; } - shape.texcoords = {{0, 1}, {1, 1}, {1, 0}, {0, 0}}; + shape.texcoords = {{0, 0}, {1, 0}, {1, 1}, {0, 1}}; return shape; } diff --git a/libs/yocto/yocto_sceneio.cpp b/libs/yocto/yocto_sceneio.cpp index 43ebb2721..0a6edfe3e 100644 --- a/libs/yocto/yocto_sceneio.cpp +++ b/libs/yocto/yocto_sceneio.cpp @@ -489,7 +489,7 @@ image_t load_image(const string& filename) { } else if (ext == ".png" || ext == ".PNG" || ext == ".jpg" || ext == ".JPG" || ext == ".jpeg" || ext == ".JPEG" || ext == ".tga" || ext == ".TGA" || ext == ".bmp" || ext == ".BMP") { - return srgbb_to_rgb(load_imageb(filename)); + return byte_to_float(load_imageb(filename)); } else if (ext == ".ypreset" || ext == ".YPRESET") { auto image = make_image_preset(filename); return is_srgb_preset(filename) ? srgb_to_rgb(image) : image;