felixpalmer / glsl-identities

Identities for mathematical functions in GLSL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glsl Identities

Identities for mathematical functions in GLSL. This repository contains a list of useful mathematical identities that apply to functions used in GLSL, the language used when creating shaders in WebGL/OpenGL.

This list provides identities that allow expressions to be simplified to something mathematically equivalent to improve performance.

Contributions welcome!

step

1.0 - step( a, x ) === step( x, a )

smoothstep

1.0 - smoothstep( a, b, x ) === smoothstep( b, a, x )

About

Identities for mathematical functions in GLSL

License:MIT License