From 013d9d3d0ebb446aa7975c8e7ab922b7392df501 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Sun, 15 Mar 2015 11:40:08 -0400 Subject: [PATCH 01/12] changing size of moon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5179191..f6f59b2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # The Book of Shaders *by [Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/)* From ce44d76393bca5a0153c3a2932b30da6ea13ae39 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Sun, 15 Mar 2015 11:54:38 -0400 Subject: [PATCH 02/12] adding thumb --- thumb.jpg | Bin 0 -> 13844 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 thumb.jpg diff --git a/thumb.jpg b/thumb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c4b945d0d405a631c7b2197a7668180deda78b68 GIT binary patch literal 13844 zcmbWe1wd6x*FL^aaOggC9lAlfyAItc9nuXFD%~IrQVP-`pa_VBbc50=Dgq)1DguJi z{5IZr@Av=i`~Khi4d?9h?3r0>*0W~z%-XXz7q2ds0U`}mbyWZYfdFXm54czXQdELn zuK|FzHoye{02Y7&Apu|@f`ESjgc`v3g#kbVLh~m!fN=a?2MPf3t^oY^Iu_vXWdb!{ zO8@=~D}nq=V+r(++EBR?*dG|ExD>ni3W)2ucn5gpoeXZC*w zh#h?V0zgOTfz^c^o%|g@90OvHpa7rC{2dS@?cFai^pYde4>S^&Tm-$ z5<7Z&If8XAZT4~WbiBj^AWpa*=mcVz7Kr1nyE+Adcn-uY9)X^&AU*^!($mS#9{}KZ zm-zus4lW?R0%ANrBLgK6OM~5y=lmCJ{}&wK6b#x407~9IA%3pTE&(VG2TqiLgoHQ> z?G)tU6cE6xXXoH<=jVu0^7izx^9lig-#A}N0VJ2cMS)Hh6_5}W{%f8}|Xf@A6c^iBG|^6c{g;7Ke1P%i!}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OTAveXYRq1TAt^osps?!b$QH*UH1?)C=Cj3F>1nlcd7wezX0aGk<4n$M{G z%9~7^JUXT56GP;4J>Re+n2}Bp+azU6piJHNqgXuojy`SPm3xx4k}6}ILt5BM_(4jv zg9DvH*x{4V@>ZTT7k2jbt}Ss6t(M7b6?WKp&2@gfk>mPE_VMvx_;<$jIt9Ckve`kO zf)@hahFaeQ#vj*Zi6qGAg_#X~UmemK?zjNv5{099*B=(W;<-ZQ=+Q2acX;;!_&yo< z-%P;1_(<1$7~iH+`ccR0PRn$Rgu6+t1UITz71PU6AM(owM6U5r;V-ZA0|Ia6eI|BE zx##(S)S~d?FL0xE!M+z;_YNHPc10zDcLm-U5j8SNYd?uY4#y@PT1%(J|^Frs*rBJj~uOil5=U#}3lDBFk^B+A!HUJhtO> ORNhNybFO>w`u_ofuO!X@ literal 0 HcmV?d00001 From b003f30bb78ca894478f961c79fe31da4bee50ba Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Sun, 15 Mar 2015 12:03:03 -0400 Subject: [PATCH 03/12] fixing typos on comments --- 05/smoothstep.frag | 2 +- 05/step.frag | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/05/smoothstep.frag b/05/smoothstep.frag index cb74404..350de26 100644 --- a/05/smoothstep.frag +++ b/05/smoothstep.frag @@ -16,7 +16,7 @@ float plot(vec2 _st, float _pct){ void main() { vec2 st = gl_FragCoord.xy/u_resolution; - // Everthins is over 0.5 will be 1.0 the rest 0.0 + // Smooth interpolation between 0.1 and 0.9 float y = smoothstep(0.1,0.9,st.x); vec3 color = vec3(y); diff --git a/05/step.frag b/05/step.frag index c7fa24d..41a82f0 100644 --- a/05/step.frag +++ b/05/step.frag @@ -16,7 +16,7 @@ void main() { vec2 st = gl_FragCoord.xy/u_resolution; // Step will return 0.0 unless the value is over 0.5, - // in that case will return 1.0 + // in that case it will return 1.0 float y = step(0.5,st.x); vec3 color = vec3(y); From 798ad11924f438f1d24cc2f09531fae79e0dc918 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Sun, 15 Mar 2015 17:48:06 -0400 Subject: [PATCH 04/12] overrideMimeType --- src/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 84a1c51..f1e81ad 100644 --- a/src/main.js +++ b/src/main.js @@ -114,7 +114,9 @@ function fetchHTTP(url, methood){ } } request.open(methood ? methood : 'GET', url, false); - request.send(); + request.overrideMimeType("text/plain"); + // request.overrideMimeType("text/html"); + request.send(null); return response; } From 29d9bae911f57f033e76b8a13ffd9646f7502c91 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Sun, 15 Mar 2015 18:17:38 -0400 Subject: [PATCH 05/12] request maimo --- src/glslCanvas.js | 1 + src/main.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glslCanvas.js b/src/glslCanvas.js index d78b272..939dad0 100644 --- a/src/glslCanvas.js +++ b/src/glslCanvas.js @@ -339,6 +339,7 @@ function fetchHTTP(url, methood){ } } request.open(methood ? methood : 'GET', url, false); + request.overrideMimeType("text/plain"); request.send(); return response; } diff --git a/src/main.js b/src/main.js index f1e81ad..5c77c0d 100644 --- a/src/main.js +++ b/src/main.js @@ -115,7 +115,6 @@ function fetchHTTP(url, methood){ } request.open(methood ? methood : 'GET', url, false); request.overrideMimeType("text/plain"); - // request.overrideMimeType("text/html"); request.send(null); return response; } From ab36c6f1c4312b1f87a3952dac1791a12f6472d6 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Mon, 16 Mar 2015 06:54:08 -0400 Subject: [PATCH 06/12] changing dir --- 90/README.md | 2 +- 91/README.md | 2 +- 92/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/90/README.md b/90/README.md index 08d7096..fe23345 100644 --- a/90/README.md +++ b/90/README.md @@ -27,7 +27,7 @@ Once you have everything installed you just need to do: ```bash cd ~ git clone https://github.com/patriciogonzalezvivo/thebookofshaders.git -cd GLSL-Book +cd thebookofshaders python -m SimpleHTTPServer ``` diff --git a/91/README.md b/91/README.md index b371a9a..8c797f1 100644 --- a/91/README.md +++ b/91/README.md @@ -15,7 +15,7 @@ make make install cd ~ git clone https://github.com/patriciogonzalezvivo/thebookofshaders.git -cd GLSL-Book +cd thebookofshaders ``` At the end of each section you will find code and non-code based exercises to give to your students. They are designed to help students immediately put concepts into practice, making concrete the abstract principles of parallel programming. diff --git a/92/README.md b/92/README.md index d3cc516..75f8cf9 100644 --- a/92/README.md +++ b/92/README.md @@ -62,7 +62,7 @@ For that open your terminal once again and type: ```bash cd ~ git clone https://github.com/patriciogonzalezvivo/thebookofshaders.git -cd GLSL-Book +cd thebookofshaders make ``` From 4f264b486ad42baa5e3b5069705a15bf00a0c39e Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez Vivo Date: Mon, 16 Mar 2015 07:20:58 -0400 Subject: [PATCH 07/12] fixing it on firefox --- 90/index.html | 1 + src/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/90/index.html b/90/index.html index 6efa064..6ffa9f5 100644 --- a/90/index.html +++ b/90/index.html @@ -54,6 +54,7 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/92/index.html b/92/index.html deleted file mode 100644 index 19c6893..0000000 --- a/92/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - How to print this book? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index f6f59b2..77019c8 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,10 @@ This is a gentle step-by-step guide through the abstract and complex universe of * Environmental-maps (spherical and cube) * Reflect and refract -* Appendix - * [How can I navigate this book offline?](90/) - * [How to use this book in a classroom with RaspberryPi?](91/) - * [How to print this book?](92/) +* [Appendix](appendix/) + * [How can I navigate this book offline?](http://thebookofshaders.com/appendix/index.html#02.md) + * [How to use this book in a classroom with RaspberryPi?](http://thebookofshaders.com/appendix/index.html#02.md) + * [How to print this book?](http://thebookofshaders.com/appendix/index.html#02.md) ## About the Author diff --git a/90/README.md b/appendix/00.md similarity index 98% rename from 90/README.md rename to appendix/00.md index fe23345..5830b3e 100644 --- a/90/README.md +++ b/appendix/00.md @@ -1,5 +1,3 @@ -# APENDIX - ## How can I navigate this book off-line? Let’s say you have a long trip and you want to use it to teach yourself some shaders. In that case you can make a local copy of this book on your computer and run a local server. diff --git a/91/README.md b/appendix/01.md similarity index 100% rename from 91/README.md rename to appendix/01.md diff --git a/92/README.md b/appendix/02.md similarity index 100% rename from 92/README.md rename to appendix/02.md diff --git a/appendix/README.md b/appendix/README.md new file mode 100644 index 0000000..03d9281 --- /dev/null +++ b/appendix/README.md @@ -0,0 +1,7 @@ +# Appendix + +* [How can I navigate this book off-line?](http://thebookofshaders.com/appendix/index.html#00.md) + +* [How to use this book in a classroom with RaspberryPi?](http://thebookofshaders.com/appendix/index.html#01.md) + +* [How to print this book?](http://thebookofshaders.com/appendix/index.html#02.md) diff --git a/90/index.html b/appendix/index.html similarity index 100% rename from 90/index.html rename to appendix/index.html diff --git a/examples/README.md b/examples/README.md index 0c46c71..c868829 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,2 +1,25 @@ # List of Examples +### Chapters examples + +* Getting started + * Hello World + - ["Hello World!"](http://thebookofshaders.com/edit.html#02/hello_world.frag) + * Uniforms + - [u_time](http://thebookofshaders.com/edit.html#03/time.frag) + - [gl_FragCoord](http://thebookofshaders.com/edit.html#03/space.frag) +* Algorithmic drawing + * Shaping functions + - [Linear Interpolation](http://thebookofshaders.com/edit.html#05/linear.frag) + - [Exponential Interpolation](http://thebookofshaders.com/edit.html#05/expo.frag) + - [Step function](http://thebookofshaders.com/edit.html#05/step.frag) + - [Smoothstep function](http://thebookofshaders.com/edit.html#05/smoothstep.frag) + - [Iñigo Quiles's impulse](http://thebookofshaders.com/edit.html#05/impulse.frag) + - [Iñigo Quiles's Cubic Pulse](http://thebookofshaders.com/edit.html#05/cubicpulse.frag) + - [Iñigo Quiles's Exponential Step](http://thebookofshaders.com/edit.html#05/expstep.frag) + - [Iñigo Quiles's Parabola](http://thebookofshaders.com/edit.html#05/parabola.frag) + - [Iñigo Quiles's Power Curve](http://thebookofshaders.com/edit.html#05/pcurve.frag) + +### Advance + +* [Moon](http://thebookofshaders.com/edit.html#examples/moon.frag&examples/images/moon-texture.jpg) diff --git a/index.html b/index.html index 928167e..fd5d208 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - GLSL Book + The Book of Shaders