pixels/shaders
2019-10-27 16:36:47 -07:00
..
frag.spv Replace vk-shader-macros with pre-compiled GLSL. Fixes #9 (#10) 2019-10-13 21:43:30 -07:00
README.md Fix typo 2019-10-27 16:36:47 -07:00
shader.frag Replace vk-shader-macros with pre-compiled GLSL. Fixes #9 (#10) 2019-10-13 21:43:30 -07:00
shader.vert Fix screen scaling when window is resized (#25) 2019-10-27 16:35:22 -07:00
vert.spv Fix screen scaling when window is resized (#25) 2019-10-27 16:35:22 -07:00

Shaders

The GLSL shader source is not compiled as part of the normal cargo build process. This was a conscious decision sparked by the current state of the ecosystem; compiling GLSL-to-SPIR-V requires a C++ toolchain including CMake, which is an unacceptable constraint for a simple crate providing a pixel buffer.

If you need to modify the GLSL sources, you must also recompile the SPIR-V as well. This can be done with glslang, glslc, etc.

Compile shaders with glslangValidator:

glslangValidator -V shader.frag && glslangValidator -V shader.vert

For more information, see https://github.com/parasyte/pixels/issues/9