Skip to content

Commit f055391

Browse files
committed
added simplex noise
Based on mesa3d MIT-licensed code
1 parent 1f500bc commit f055391

File tree

7 files changed

+819
-2
lines changed

7 files changed

+819
-2
lines changed

AUTHORS

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Acknowledgements
2-
----------------
2+
================
3+
4+
Perlin noise
5+
------------
36

47
Perlin Noise Implementation is based on Ken Perlin's own Java reference code:
58

@@ -11,9 +14,14 @@ Tiled Perlin noise is based on Perlin Noise Math FAQ by M. Zucker
1114
http://web.archive.org/web/20070708001151/\
1215
http://www.cs.cmu.edu/~mzucker/code/perlin-noise-math-faq.html
1316

17+
Simplex noise
18+
-------------
19+
20+
Simplex noise implementation is taken from MIT-licensed Mesa 7.5 library.
21+
http://www.mesa3d.org/
1422

1523
Lua-Noise authors
16-
-----------------
24+
=================
1725

1826
This Lua C module was coded by:
1927

make.sh

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
# Under Linux you'd need other flags to create .so.
55

66
gcc src/perlin.c -O2 -Werror -Wall --pedantic -c89 $LDFLAGS -llua -dynamiclib -undefined dynamic_lookup -o perlin.so
7+
8+
gcc src/mesa/prog_noise.c src/simplex.c -O2 -Werror -Wall --pedantic -c89 $LDFLAGS -llua -dynamiclib -undefined dynamic_lookup -o simplex.so

src/mesa/VERSION

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Excerpt from MIT-licensed Mesa 7.5
2+
http://cgit.freedesktop.org/mesa/mesa/
3+
4+
File main/imports.h is substitute with slim version
5+
to suit the needs of the prog_noise.c.

src/mesa/main/imports.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* imports.h: drop-in replacement for mesa imports.h
3+
* For the needs of prog_noise.c
4+
* This file is NOT from the mesa sources.
5+
*/
6+
7+
#ifndef IMPORTS_H
8+
#define IMPORTS_H
9+
10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
14+
typedef float GLfloat;
15+
16+
#ifdef __cplusplus
17+
}
18+
#endif
19+
20+
#endif /* IMPORTS_H */

0 commit comments

Comments
 (0)