Microsoft Corporation
GPU calculation of signed distance fields
Last updated:
Abstract:
Representative embodiments disclose mechanisms to create a distance field within a Graphics Processing Unit. This allows distance fields to be used in real time environments rather than having to be pre-calculated offline. Distance fields can be stored in a channel of a texture. To calculate the distance field, information that describes a shape are evaluated and shape segments that define the shape are created. A bounding box is created for each segment. For each pixel in each bounding box, the distance to the segment is calculated to create segment distance fields. For segments modeled with straight lines and quadratic segments, closed form solutions that can be implemented in the GPU are used. The individual segment distance fields are combined to form an overall shape distance field. A signed distance field is created by determining the inside and outside of the shape and adjusting distance field values appropriately.
Utility
7 Dec 2018
27 Jul 2021