GLSL built-in function
asin()
Inverse sine; the input must be between minus one and one.
Demo version: GLSL ES 1.00 / WebGL 1Demo stage: Fragment
Syntax
genType asin(genType x)genType means float / vec2 / vec3 / vec4; matching placeholders use the same type.
Parameters
- x
- Input value or left-hand vector
Return value
An angle in radians in [-PI/2, PI/2], component-wise; x must be in [-1, 1].
Live example
Edit the code and the preview updates as you type.
What asin does
Inverse sine; the input must be between minus one and one.
Read the preview
The scaled asin(x)*0.63661977 curve bends steeply near x = -1 and x = 1. Try asin(x*0.5) to show only the gentler central part of inverse sine.
Core call
asin(x)*0.63661977;
Values outside [-1, 1] are undefined; clamp computed inputs first.
Experiment
Change the multiplier after asin(x) from 0.63661977 to 0.318309885. The same valid inputs remain, but the displayed curve reaches only half its original height.