asin
A math node that wraps the GLSL `asin()` (arcsin) function. It takes an input value within the domain of [-1, 1] and returns its corresponding angle in radians.
Core Advantages
Provides the fundamental mathematical ability to 'reverse-engineer' an angle from a ratio, which is core to geometric calculations and coordinate system conversions. Its unique non-linear response curve (slow in the middle, rapid at the ends) also makes it a powerful tool for creating special visual effects like lens distortion and non-linear animation easing.
Common Uses
Calculating the latitude angle of a vertex on a sphere from its height (y-coordinate).
Simulating lens distortion or fisheye effects by warping UV coordinates.
Transforming a smooth sin/cos wave into a square-like wave with sharp peaks for vertex displacement or color effects.
Serving as a key step in algorithms for converting from Cartesian to Spherical coordinate systems.
How to adjust
This node itself is not configurable. All adjustments are made by manipulating its input node. For example, feeding a standard `sin(time)` signal into `asin` will output a sharp, spiky wave that changes drastically near its extremes, instead of a smooth one.
Code Examples
1 // A standard sine wave
2 const sineWave = sin( uv.x.mul( 10.0 ).add( time ) );
3
4 // Use asin to transform the smooth sine wave into one with sharp peaks
5 const sharpWave = asin( sineWave );
6
7 // Use the result to modify vertex displacement
8 position.y.addAssign( sharpWave );