Crates.io | shader-translator |
lib.rs | shader-translator |
version | 0.4.0 |
source | src |
created_at | 2019-11-22 08:05:54.985043 |
updated_at | 2021-07-03 08:36:21.950225 |
description | Tiny program to read glsl from stdin, and write spir-v to stdout |
homepage | https://github.com/stevebob/shader-translator |
repository | https://github.com/stevebob/shader-translator |
max_upload_size | |
id | 183444 |
size | 11,607 |
This is a binary wrapper of shaderc which compiles GLSL shader source code read from stdin, into SPIR-V source code written to stdout.
$ cargo install shader-translator
$ shader-translator --help
Usage: shader-translator [options]
Options:
-f, --fragment fragment shader
-v, --vertex vertex shader
-h, --help print this help menu
$ echo -e "#version 450\nvoid main() {}" | shader-translator --fragment > /tmp/frag.spv
$ file /tmp/frag.spv
/tmp/frag.spv: Khronos SPIR-V binary, little-endian, version 0x00010000, generator 0x000d0007