patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.

Home Page:http://TheBookOfShaders.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSX: book export is broken

xeonarno opened this issue · comments

On osx, when I follow the tutorial to generate book (pdf...), It failed :

`$ make

rm -rf */tmp.md
rm -rf */tmp*.png
rm -rf book.*
python2.7 src/parseBook.py  -f tex -f pdf -f epub
glslViewer ./02/hello_world.frag --s 0.5 --headless -o ./02/tmp-hello_world.png
Error watching for file 0.5
Error watching for file ./02/tmp-hello_world.png

Also python 2.7 is dead on homebrew :(

System info :
MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
10.15.7

I'm facing this too. Did you solve it?

No, It require to rewrite and build with Python 3.9 :(

commented

Issue persists on Linux too, but I managed to fix it somehow:
In file src/parseBook.py change line 46 to "--headless -E screenshot," + shaderImage
In file Makefile replace all python2.7 with python3 (works for now).
Maybe I should make PR with that fixes? 🤔

I faced the same error and managed to resolve it.
Since all the needed images are already included in the repository we no longer need glslViewer to render them. In fact even after installing the glslViewer it won't render those shaders to image files, I don't know why.
I managed to compile the book by commenting out lines in the parseBook.py from line 44 to line 49.
If you face error [WARNING] Could not fetch resource './04/glslEditor-01-0.png': replacing image with description make sure you have installed imagemagick package. On Ubuntu I installed it with sudo apt install imagemagick-6.q16.