norm & snorm for jit.expr

Cheng Chien-Wen's icon

The help file for jit.expr says:
- norm[0-31] (normalized coordinate across dim);
- snorm[0-31] (signed normalized coordinate across dim).

But I don't quite understand what they means.
Could someone help explain further ?

Thanks.

Joshua Kit Clayton's icon

norm[0] will spread a gradient from 0 to 1 across the x axis
norm[1] will spread a gradient from 0 to 1 across the y axis

snorm[0] will spread a gradient from -1 to 1 across the x axis
snorm[1] will spread a gradient from -1 to 1 across the y axis

Cheng Chien-Wen's icon

Thank you very much.

Andrew Benson's icon