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.
Manoylov Andriy eb8d3c5f80 add ukrainian translation 9 months ago
..
README-ch.md add Chinese support for appendix 2 years ago
README-de.md % find . -type f -print0 | xargs -0 dos2unix 7 years ago
README-fr.md Python 2 -> 3 4 years ago
README-id.md updated print guide instruction for homebrew cask 3 years ago
README-it.md Remove trailing whitespaces 7 years ago
README-pl.md appendix 1 year ago
README-ru.md Python 2 -> 3 4 years ago
README-ua.md add ukrainian translation 9 months ago
README-vi.md updated print guide instruction for homebrew cask 3 years ago
README.md Update brew install cask command 1 year ago
index.php add ukrainian translation 9 months ago

README.md

How to print this book?

Lets say you dont want to navigate or interact with the examples and you just want a good old fashion text book which you can read on the beach or on your commute to the city. In that case you can print this book.

Installing glslViewer

For printing this book you need first to parse it. For that you will need glslViewer a console shader tool that will compile and transform the shader examples into images.

In MacOSX get sure to have homebrew installed and then on your terminal do:

brew install glslviewer

On Raspberry Pi you need to get Raspbian, a Debian-based Linux distribution made for Raspberry Pi and then do:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core glslviewer

Installing Python 3, Latex Engine and Pandoc

For parsing the Markdown chapters into Latex and then into a PDF file we will use Xetex Latex Engine and Pandoc.

In MacOSX:

Download and Install MacTeX by:

brew install --cask mactex-no-gui

and then install Pandoc and Python 3 by:

brew install pandoc python

On Raspberry Pi (Raspbian):

sudo apt-get install texlive-xetex pandoc python2.7

Compile the book into a pdf and print it

Now that you have all you need, it is time to clone the repository of this book and compile the book.

For that open your terminal once again and type:

cd ~
git clone https://github.com/patriciogonzalezvivo/thebookofshaders.git
cd thebookofshaders
make clean pdf

If everything goes well, you will see a book.pdf file which you can read on your favorite device or print.

Compile the book into an epub for use with an e-reader

cd ~
git clone https://github.com/patriciogonzalezvivo/thebookofshaders.git
cd thebookofshaders
make clean epub

The generated book.epub can be used directly, or converted to a .mobi file for use with Kindle by using a converter, for example Calibre.