thebookofshaders/README.md

83 lines
3.2 KiB
Markdown
Raw Normal View History

2015-03-15 15:40:08 +00:00
<canvas id="custom" class="canvas" data-fragment-url="examples/moon.frag" data-textures="examples/images/moon-texture.jpg" width="350px" height="350px"></canvas>
2015-03-15 15:21:47 +00:00
# The Book of Shaders
*by [Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/)*
This is a gentle step-by-step guide through the abstract and complex universe of Fragment Shaders.
2015-03-31 16:04:59 +00:00
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="float: right;">
2015-03-30 19:38:33 +00:00
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="B5FSVSHGEATCG">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
2015-03-15 15:21:47 +00:00
## Contents
* [About this book](00/)
* Getting started
* [What is a shader?](01/)
* [“Hello world!”](02/)
* [Uniforms](03/)
* [Running your shader](04/)
* Algorithmic drawing
* [Shaping functions](05/)
2015-03-21 13:02:43 +00:00
* [Colors](06/)
2015-03-31 16:04:59 +00:00
* [Shapes](07/)
2015-03-15 15:21:47 +00:00
* Matrices
* Patterns
* Generative designs
* Random
* Noise
* Fractional brownian motion
* Fractals
2015-03-15 15:21:47 +00:00
* Image processing:
* What is a texture?
* Image operations
* Kernel convolutions
* Filters
* Others effects
* Simulation
* Pingpong
* Conway
* Ripples
* Water color
* Reaction diffusion
* Voronoi
* 3D graphics
* Lights
* Normal-maps
* Bump-maps
* Ray marching
* Environmental-maps (spherical and cube)
* Reflect and refract
2015-03-17 14:06:21 +00:00
* [Appendix](appendix/)
2015-03-17 20:15:51 +00:00
* [How can I navigate this book offline?](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)
2015-03-17 14:06:21 +00:00
* [How to print this book?](http://thebookofshaders.com/appendix/index.html#02.md)
2015-03-15 15:21:47 +00:00
2015-03-22 12:07:04 +00:00
* [Examples](examples/)
2015-03-15 15:21:47 +00:00
## About the Author
[Patricio Gonzalez Vivo](http://patriciogonzalezvivo.com/) (1982, Buenos Aires, Argentina) is a New York based artist and developer. He explores interstitial spaces between organic and synthetic, analog and digital, individual and collective. In his work he uses code as an expressive language with the intention of developing a better together.
Patricio studied and practiced psychotherapy and expressive art therapy. He holds an MFA in Design & Technology from Parsons The New School, where he now teaches. Currently he works as a Graphic Engineer at Mapzen making openSource mapping tools.
2015-03-20 10:44:31 +00:00
<p class="header"><a href="http://twitter.com/patriciogv" target="_blank">Twitter</a> - <a href="https://github.com/patriciogonzalezvivo" target="_blank">GitHub</a> - <a href="https://vimeo.com/patriciogv" target="_blank">Vimeo</a> - <a href="https://www.flickr.com/photos/106950246@N06/" target="_blank"> Flickr</a></div>
2015-03-15 15:21:47 +00:00
## Acknowledgements
Thanks to my wife [Jen Lowe](http://www.datatelling.com/), for her unconditional support, help and time editing this book.
Thanks [Scott Murray](http://alignedleft.com/) for the inspiration and advice.
Thanks [Karim Naaji](http://karim.naaji.fr/) for contributing with support, good ideas and code.