pub struct NormalLayer {
pub velocity: [f32; 2],
pub scale: f32,
pub strength: f32,
}Expand description
One layer of a material’s scrolling normals
(SurfaceMaterial::normal_layers): the material’s normal map drawn at
its own scale, moving across the surface.
Fields§
§velocity: [f32; 2]The direction and speed the layer moves across the surface, in the
material’s UV units per second along U and V. SGL3D rounds it to a
whole number of repeats of the layer’s map per hour, so the layer is
where it was an hour earlier and long sessions keep their precision:
in steps of 1/(3600 × scale) UV units per second, at most half a
step off, and a layer slower than 1/7200 of a repeat per second
stands still. At most 2^24 repeats per hour (about 4660 a second).
scale: f32How many times the normal map repeats per unit of the material’s UVs; positive.
strength: f32How much of the layer’s slopes the surface takes, with the
material’s normal_scale: 1 as the map is authored, 0 none.