You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thebookofshaders/README.md

84 lines
3.1 KiB
Markdown

<canvas id="custom" class="canvas" data-fragment-url="examples/moon.frag" data-textures="examples/images/moon-texture.jpg" width="350px" height="350px"></canvas>
9 years ago
# 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.
<div class="header">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B5FSVSHGEATCG" style="float: right;"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt=""></a>
</div>
9 years ago
## 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/)
9 years ago
* [Colors](06/)
9 years ago
* [Shapes](07/)
9 years ago
* Matrices
* Patterns
* Generative designs
* Random
* Noise
* Fractional brownian motion
* Fractals
9 years ago
* Image processing:
9 years ago
* Textures
9 years ago
* 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
9 years ago
* [Examples](examples/)
* [Glossary](glossary/)
9 years ago
* [Appendix:](appendix/) Other ways to use this book
* [How can I navigate this book offline?](appendix/)
* [How to run the examples on a RaspberryPi?](appendix/)
* [How to print this book?](appendix/)
9 years ago
## 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.
9 years ago
<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>
9 years ago
## 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.
Thanks to everyone that by beliving in this project had contribute with fixes or donations: *Andreas Wilcox, Jonathan Jin, James Phillips, Drew Lustro, Mike Reinstein, Bradley Bossard, Nestor Rubio Garcia, Magnus Öberg, Kyle Stewart, Al Matthews, Michael Parisi and Gerry Straathof*