GLSL built-in function

sinh()

Returns the hyperbolic sine.

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

Syntax

genType sinh(genType x)

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

Parameters

x
Input value or left-hand vector

Return value

A floating-point result per component equal to (exp(x) - exp(-x)) / 2.

Live example

Edit the code and the preview updates as you type.

What sinh does

Returns the hyperbolic sine.

Read the preview

The sinh(x)*0.5 curve passes through zero and steepens toward either side. Set its multiplier to 1.0 to make the outer parts extend beyond the plot.

Core call

sinh(x)*0.5;

Magnitude grows rapidly; the preview uses a bounded input interval.

Experiment

Replace the argument x with x*0.5 in sinh. The central slope becomes gentler and the visible range covers less of the rapidly growing tails.

Specification

GLSL ES 3.00 built-in functions, chapter 8

Related functions