Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
xelatihy committed Jan 12, 2024
1 parent a1f9903 commit c8b28cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libs/yocto/yocto_diagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion libs/yocto/yocto_sceneio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ image_t<vec4f> 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;
Expand Down

0 comments on commit c8b28cc

Please sign in to comment.