Skip to main content

MAX_STOPS

Constant MAX_STOPS 

Source
pub const MAX_STOPS: usize = 4;
Expand description

The most stops a gradient carries in the material itself.

Four covers the overwhelming majority of real gradients, and covers them without a texture, an upload or a binding. It is not a limit on what can be drawn: beyond this the recorder tabulates the stops into a ramp and the shader samples it instead, which is what this constant used to say was waiting on the HAL learning to sample textures. It has since learned.