mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Trail thinning is now smooth
This commit is contained in:
parent
87434c472c
commit
fc1a9f3c61
@ -47,8 +47,11 @@ impl TrailMgr {
|
||||
// Verts per quad are in b, c, a, d order
|
||||
vertices[i * 4 + 2] = vertices[i * 4 + 2] * TRAIL_SHRINKAGE
|
||||
+ vertices[i * 4] * (1.0 - TRAIL_SHRINKAGE);
|
||||
vertices[i * 4 + 3] = vertices[i * 4 + 3] * TRAIL_SHRINKAGE
|
||||
+ vertices[i * 4 + 1] * (1.0 - TRAIL_SHRINKAGE);
|
||||
if i != (self.offset + TRAIL_DYNAMIC_MODEL_SIZE - 1) % TRAIL_DYNAMIC_MODEL_SIZE {
|
||||
// Avoid shrinking edge of most recent quad so that edges of quads align
|
||||
vertices[i * 4 + 3] = vertices[i * 4 + 3] * TRAIL_SHRINKAGE
|
||||
+ vertices[i * 4 + 1] * (1.0 - TRAIL_SHRINKAGE);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset quad for each entity mesh at new offset
|
||||
|
Loading…
Reference in New Issue
Block a user