Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinKonowalczyk committed Jan 17, 2025
1 parent 9085ed0 commit f1a7224
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions docs/source/noise.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ Header: cglm/noise.h

Classic Perlin noise implementation.

Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
https://github.com/stegu/webgl-noise
Following Stefan Gustavson's paper "Simplex noise demystified":
http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

Implementation based on glm::perlin function:
https://github.com/g-truc/glm/blob/master/glm/gtc/noise.inl

Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Functions:

1. :c:func:`glm_perlin_vec4`
#. :c:func:`glm_perlin_vec3`
#. :c:func:`glm_perlin_vec2`


Functions documentation
Expand All @@ -39,3 +48,13 @@ Functions documentation
Returns:
| noise value
.. c:function:: float glm_perlin_vec2(vec2 point)
| Classic Perlin noise
Parameters:
| *[in]* **point** 2D point
Returns:
| noise value
2 changes: 1 addition & 1 deletion include/cglm/noise.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Following Stefan Gustavson's paper "Simplex noise demystified":
* http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
*
* Implementation based on glm::glc::noise.hpp:
* Implementation based on glm::perlin function:
* https://github.com/g-truc/glm/blob/master/glm/gtc/noise.inl
*/

Expand Down

0 comments on commit f1a7224

Please sign in to comment.