- uv_left = static_cast<float>(x) / tex_w;
- uv_top = static_cast<float>(y) / tex_h;
- uv_right = static_cast<float>(x+w) / tex_w;
- uv_bottom = static_cast<float>(y+h) / tex_h;
+ uv_left = static_cast<float>(x+0.5) / tex_w;
+ uv_top = static_cast<float>(y+0.5) / tex_h;
+ uv_right = static_cast<float>(x+w-0.5) / tex_w;
+ uv_bottom = static_cast<float>(y+h-0.5) / tex_h;