NormalBuffer
Description
- Derived from
-
SampleBufferFloat32 abstract
An implementation of the ISampleBuffer interface that stores normal vectors.
Each normal buffer sample is a tuple of three floating-point values, representing the unit-length normal vector component along the X, Y and Z axis.
Public / Methods
ComputeNormals
2 overloads
Computes the normal buffer samples (in terrain-space) from the given data.
The relative pixel intensities (red, green, blue) in the range [0..1] are mapped to the unit cube:
red :[0..1] => X:[-1 .. +1] green:[0..1] => Y:[-1 .. +1] blue :[0..1] => Z:[-1 .. +1]
where X
, Y
and Z
correspond to the terrain-space axes, as defined by geometry in.
Computes the normal buffer samples (in tangent-space) from the given elevation buffer.
The relative pixel intensities (red, green, blue) in the range [0..1] are mapped to the unit cube:
red :[0..1] => X:[-1 .. +1] green:[0..1] => Y:[-1 .. +1] blue :[0..1] => Z:[-1 .. +1]
where X+
is the tangent direction (positive X-axis), Y+
is the bitangent direction (buffer Y-axis) and Z+
is direction of the surface normal vector.