Skip to content

Instantly share code, notes, and snippets.

View saffronjam's full-sized avatar
:octocat:
It's only a game, why you have to be mad?

Emil Karlsson saffronjam

:octocat:
It's only a game, why you have to be mad?
  • KTH Royal Institute of Technology
  • Stockholm
View GitHub Profile
@DonKarlssonSan
DonKarlssonSan / complex.glsl
Last active July 14, 2024 21:52
Complex Number Math In GLSL
// 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;