DistanceBuffer
Description
- Derived from
-
FloatBuffer abstract
A distance buffer stores signed distance values towards the border of a two-dimensional shape (negative is inside).
Distance textures can be used for high-quality rendering of shapes (for example terrain decals). The samples in a distance buffer have a pixel-is-area semantic (see PixelCoverage.PixelIsArea): The sample value is the distance from the center of the sample area towards the nearest point on the shape border.
Public / Constants
ScanlineRangeDefault
The default value of ISampleBuffer.ScanlineRange.
The distance value range is exploited during rasterization: regions that only contain distance values below the minimum bound or above the maximum bound will be skipped.
For image coding, the raw pixel value corresponds to the signed distance value.
The default pixel range maps signed distance values as follows:
-1 : 16777215 (i.e. maximum pixel channel value when inside of shape)
+1 : 0 (i.e. minimum pixel channel value when outside of shape).