diff --git a/05/README.md b/05/README.md index dca969f..b143fb7 100644 --- a/05/README.md +++ b/05/README.md @@ -103,15 +103,13 @@ At the end of the last exercise we introduced some new functions. Now it’s tim * [Bezier and Other Parametric Shaping Functions: www.flong.com/texts/code/shapers_bez](http://www.flong.com/texts/code/shapers_bez/) +
+ Like chefs that collect spices and exotic ingredients, digital artists and creative coders have a particular love of working on their own shaping functions. [Iñigo Quiles](http://www.iquilezles.org/) has a great collection of [useful functions](http://www.iquilezles.org/www/articles/functions/functions.htm). After reading [this article](http://www.iquilezles.org/www/articles/functions/functions.htm) take a look at the following translation of these functions to GLSL. Pay attention to the small changes required, like putting the "." (dot) on floating point numbers and using the GLSL name for *C functions*; for example instead of ```powf()``` use ```pow()```: -* [Impulse](../edit.html#05/impulse.frag) -* [Cubic Pulse](../edit.html#05/cubicpulse.frag) -* [Exponential Step](../edit.html#05/expstep.frag) -* [Parabola](../edit.html#05/parabola.frag) -* [Power Curve](../edit.html#05/pcurve.frag) +
To keep your motivation up, here is an elegant example (made by [Danguafer](https://www.shadertoy.com/user/Danguafer)) of mastering the shaping-functions karate. diff --git a/05/cubicpulse.frag b/05/cubicpulse.frag index f1461f5..0494557 100644 --- a/05/cubicpulse.frag +++ b/05/cubicpulse.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: Cubic Pulse + #ifdef GL_ES precision mediump float; #endif diff --git a/05/expo.frag b/05/expo.frag index 8f02d22..eda4018 100644 --- a/05/expo.frag +++ b/05/expo.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: Expo + #ifdef GL_ES precision mediump float; #endif diff --git a/05/expstep.frag b/05/expstep.frag index 60369d4..a27afc8 100644 --- a/05/expstep.frag +++ b/05/expstep.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: ExpStep + #ifdef GL_ES precision mediump float; #endif diff --git a/05/featured_examples.php b/05/featured_examples.php index 91092ed..02bce30 100644 --- a/05/featured_examples.php +++ b/05/featured_examples.php @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/05/impulse.frag b/05/impulse.frag index 9ca5091..8572f3b 100644 --- a/05/impulse.frag +++ b/05/impulse.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: Impulse + #ifdef GL_ES precision mediump float; #endif diff --git a/05/parabola.frag b/05/parabola.frag index 6b9f5ed..01c0a40 100644 --- a/05/parabola.frag +++ b/05/parabola.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: Parabola + #ifdef GL_ES precision mediump float; #endif diff --git a/05/pcurve.frag b/05/pcurve.frag index 33fc204..3cc8acf 100644 --- a/05/pcurve.frag +++ b/05/pcurve.frag @@ -1,3 +1,6 @@ +// Author: Inigo Quiles +// Title: Pcurve + #ifdef GL_ES precision mediump float; #endif diff --git a/07/featured_examples.php b/07/featured_examples.php index 5ff584d..4ca2749 100644 --- a/07/featured_examples.php +++ b/07/featured_examples.php @@ -1 +1 @@ -
+
diff --git a/12/README.md b/12/README.md index 7d4e65c..2fe96e6 100644 --- a/12/README.md +++ b/12/README.md @@ -159,7 +159,7 @@ Once you figurate out this algorithm think interesting and creative uses for it. In 2011, [Stefan Gustavson optimized Steven Worley's algorithm to GPU](http://webstaff.itn.liu.se/~stegu/GLSL-cellular/GLSL-cellular-notes.pdf) by only iterating trough a 2x2 matrix instead of 3x3. This reduce the work significantly but can create artifacts in form of discontinuities. Take a look to the following examples. -
+
Later in 2012 [Inigo Quilez wrote an article on how to make precise voronoi borders](http://www.iquilezles.org/www/articles/voronoilines/voronoilines.htm). @@ -175,4 +175,4 @@ Now is up to look closely at things, be inspired by nature to find your own voic ![Deyrolle glass film - 1831](DeyrolleFilm.png) -
+
diff --git a/README.md b/README.md index f98bec5..8eb9e10 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ Thanks to my wife [Jen Lowe](http://www.datatelling.com/), for her unconditional Thanks [Scott Murray](http://alignedleft.com/) for the inspiration and advice. +Thanks [Kenichi Yoneda (Kynd)](https://twitter.com/kyndinfo), [Nicolas Barradeau](https://twitter.com/nicoptere), [Karim Naaji](http://karim.naaji.fr/) for contributing with support, good ideas and code. + Thanks [Kenichi Yoneda (Kynd)](https://twitter.com/kyndinfo) and [Sawako](https://twitter.com/sawakohome) for the [Japanese translation (日本語訳)](?lan=jp) Thanks [Tong Li](https://www.facebook.com/tong.lee.9484) and [Yi Zhang](https://www.facebook.com/archer.zetta?pnref=story) for the [Chinese translation (中文版)](?lan=ch) @@ -87,7 +89,7 @@ Thanks [Jae Hyun Yoo](https://www.facebook.com/fkkcloud) for the Korean [transla Thanks [Nahuel Coppero (Necsoft)](http://hinecsoft.com/) for the Spanish [translation (español)](?lan=es) -Thanks [Karim Naaji](http://karim.naaji.fr/) for contributing with support, good ideas and code. +Thanks [Nicolas Barradeau](https://twitter.com/nicoptere) and [Karim Naaji](http://karim.naaji.fr/) for the French [translation (france)](?lan=fr) Thanks to everyone who has believed in this project and [contributed with fixes](https://github.com/patriciogonzalezvivo/thebookofshaders/graphs/contributors) or donations. diff --git a/chap-header.php b/chap-header.php index 76594e4..7b3ee36 100644 --- a/chap-header.php +++ b/chap-header.php @@ -1,11 +1,6 @@ - -

The Book of Shaders by Patricio Gonzalez Vivo

-

日本語 - 中文版 - 한국어 - Español - French - Italiano - English

- -
- '; - -?> +
+

The Book of Shaders by Patricio Gonzalez Vivo

+

日本語 - 中文版 - 한국어 - Español - French - Italiano - English

+
+
diff --git a/examples/index.php b/examples/index.php index 24f96ee..1d420c3 100755 --- a/examples/index.php +++ b/examples/index.php @@ -50,7 +50,7 @@ echo ','; } } - echo '" data-properties="clickRun:edior,hoverPreview:false,showAuthor:false,openFrameIcon:false">'; + echo '" data-properties="clickRun:editor,hoverPreview:false,showAuthor:false,openFrameIcon:false">'; } if (file_exists($folder.'featured_examples.php') and file_exists('FEATURED'.$language.'.md')) { @@ -85,7 +85,7 @@ echo ','; } } - echo '" data-properties="clickRun:edior,showAuthor:false,openFrameIcon:false">'; + echo '" data-properties="clickRun:editor,showAuthor:false,openFrameIcon:false">'; } diff --git a/footer.php b/footer.php index f017bf9..1c25fc8 100644 --- a/footer.php +++ b/footer.php @@ -1,20 +1,22 @@ + + + -

Copyright 2015 Patricio Gonzalez Vivo

- + echo ' + '; +?> - - - + ga("create", "UA-18824436-2", "auto"); + ga("send", "pageview"); + + - '; -?> + diff --git a/glossary/index.php b/glossary/index.php index c80b692..d5720f6 100644 --- a/glossary/index.php +++ b/glossary/index.php @@ -6,13 +6,14 @@ include($path."/header.php"); include($path."/src/parsedown/Parsedown.php"); - - echo ' -

The Book of Shaders by Patricio Gonzalez Vivo

+?> +
+

The Book of Shaders by Patricio Gonzalez Vivo

+

- '; +text(file_get_contents ('README.md')); diff --git a/header.php b/header.php index 0b844b2..06c2484 100644 --- a/header.php +++ b/header.php @@ -1,12 +1,12 @@ - - The Book of Shaders'.$subtitle.' +The Book of Shaders'.$subtitle.''; +?> + @@ -15,57 +15,64 @@ echo ' - + + - + '; +?> - '; +'; + } else { + echo ' + '; + } +?> -if (file_exists($path."/src/glslCanvas/build/GlslCanvas.min.js")) { - echo ''; -} else { - echo ''; -} - echo ' - '; -if (file_exists($path."/src/glslEditor/build/glslEditor.js")) { - echo ' + + '; -} else { - echo ' + } else { + echo ' '; -} + } +?> -if (file_exists($path."/src/glslGallery/build/glslGallery.js")) { - echo ' + + '; -} else { - echo ' + } else { + echo ' '; -} - echo ' - - - - '; - -if ( $language !== '' && file_exists($path.'/css/style'.$language.'.css') ) { - echo ''; -} - -echo ' - - - '; + } ?> + +'; + if ( $language !== '' && file_exists($path.'/css/style'.$language.'.css') ) { + echo ' + + '; + } +?> + + \ No newline at end of file