Align normals and workplanes to pixel grid.

They look much sharper and nicer this way, and more similar to 2.0.
pull/33/head
whitequark 2016-07-25 10:07:28 +00:00
parent bcd8c3e790
commit 0c90cd799d
1 changed files with 2 additions and 0 deletions

View File

@ -581,6 +581,7 @@ void Entity::Draw(DrawAs how, Canvas *canvas) {
} else { } else {
tail = SK.GetEntity(point[0])->PointGetNum(); tail = SK.GetEntity(point[0])->PointGetNum();
} }
tail = camera.AlignToPixelGrid(tail);
Vector v = (q.RotationN()).WithMagnitude(50.0 / camera.scale); Vector v = (q.RotationN()).WithMagnitude(50.0 / camera.scale);
Vector tip = tail.Plus(v); Vector tip = tail.Plus(v);
canvas->DrawLine(tail, tip, hcs); canvas->DrawLine(tail, tip, hcs);
@ -602,6 +603,7 @@ void Entity::Draw(DrawAs how, Canvas *canvas) {
const Camera &camera = canvas->GetCamera(); const Camera &camera = canvas->GetCamera();
Vector p = SK.GetEntity(point[0])->PointGetNum(); Vector p = SK.GetEntity(point[0])->PointGetNum();
p = camera.AlignToPixelGrid(p);
Vector u = Normal()->NormalU(); Vector u = Normal()->NormalU();
Vector v = Normal()->NormalV(); Vector v = Normal()->NormalV();