GLSL built-in function

asinh()

Returns the inverse hyperbolic sine.

Demo version: GLSL ES 3.00 / WebGL 2Demo stage: Fragment

Syntax

genType asinh(genType x)

genType means float / vec2 / vec3 / vec4; matching placeholders use the same type.

Parameters

x
Input value or left-hand vector

Return value

The inverse hyperbolic sine of each component, with the same floating-point type as x.

Live example

Edit the code and the preview updates as you type.

What asinh does

Returns the inverse hyperbolic sine.

Read the preview

asinh(x*3.0)*0.5 gives an odd curve that flattens toward either side. Change 3.0 to 1.0 to show a smaller, less bent input interval.

Core call

asinh(x*3.0)*0.5;

Both signs are accepted; it can compress ranges while preserving sign.

Experiment

Replace the final *0.5 after asinh(x*3.0) with *0.25. Both ends move closer to the horizontal center while the zero crossing stays fixed.

Specification

GLSL ES 3.00 built-in functions, chapter 8

Related functions