This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hyperboloc functions by toneburst from | |
// https://machinesdontcare.wordpress.com/2008/03/10/glsl-cosh-sinh-tanh/ | |
// These are missing in GLSL 1.10 and 1.20, uncomment if you need them | |
/* | |
/// COSH Function (Hyperbolic Cosine) | |
float cosh(float val) | |
{ | |
float tmp = exp(val); | |
float cosH = (tmp + 1.0 / tmp) / 2.0; |