felixpalmer / procedural-gl-js

Mobile-first 3D mapping engine with emphasis on user experience
https://www.procedural.eu/map
Mozilla Public License 2.0
1.28k stars 84 forks source link

Issues running compile #1

Open jczaplew opened 3 years ago

jczaplew commented 3 years ago

Thanks for making this great library open source! It is a really exciting contribution to the web mapping ecosystem. I was trying to run procedural-gl.js locally and ran into some issues while running shaders/minify.sh.

The first issue I encountered is that glsl-validate.py could not be found. I found that it references your library glsl-validator, but after bringing that in discovered that the compiled binaries for MacOS seem to be for an older runtime. I did some research into the origins of those binaries and it seems they come from angle, but it seems the essl_to_glsl utility no longer exists.

The second issue I encountered is that glslmin doesn't seem to work with newer versions of nodejs, at least not entirely. Using the syntax in minify.sh glslmin would hang on the first file and never finish or write an output. I was able to work around this by piping the input into the utility instead as so cat beacon.frag | cat glslmin > min/beacon.frag, but that seems less than ideal.

Do you have any advice for getting this step of the build pipeline to complete? Are there other utilities that could be used in place of glsl-validate.py and glslmin?

My system is as follows: MacOS 10.15.7 Node v12.14.1 Python 2.7.16 Python3 3.7.9

Thank you!

felixpalmer commented 3 years ago

I'm still on OSX 10.14.4, shame to hear they no longer work for 10.15. essl_to_glsl is only used to validate the shaders, and helps during development, but isn't required for the build. However, you would need to disable the validate_shader method in glsl-validate.py.

The workaround for glslmin is ugly, but appears to work. I have node 12.16, and Python 2.7.10 - not sure why it isn't working for you, sorry.

As for a solution, try running npm run build-dev (I just pushed a change). This will create a dev module build (see index.module.html) that doesn't require all this shader optimization. Hopefully that will at least let you get a build without minified shaders for now, and then you can return to trying to fix those in the future if it is important for you. If you find a fix, please share!