Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do the texel-uv-to-pixel-uv conversion in floating point instead of in integers. #253

Merged
merged 1 commit into from Mar 30, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -538,8 +538,9 @@ impl TextureCacheItem {
Point2D::new(self.uv_rect().top_left.x, self.uv_rect().top_left.y),
Size2D::new(self.uv_rect().bottom_right.x - self.uv_rect().top_left.x,
self.uv_rect().bottom_right.y - self.uv_rect().top_left.y)),
pixel_uv: Point2D::new(self.uv_rect().top_left.x as u32 * texture_size.width,
self.uv_rect().top_left.y as u32 * texture_size.height),
pixel_uv:
Point2D::new((self.uv_rect().top_left.x * texture_size.width as f32) as u32,
(self.uv_rect().top_left.y * texture_size.height as f32) as u32),
}
}

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<style>
body {
background: black;
}
div {
color: white;
text-shadow: 5px 5px 5px white;
}
</style>
<div>whoa</div>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.