Skip to content

Compiling shaders #838

Closed Answered by bluesillybeard
bluesillybeard asked this question in Q&A
Discussion options

You must be logged in to vote

After reading the source code some more and messing around for a bit, I figured out that is the job of krafix in the tools.

So for example, krafix spirv [workspace]/src/shaders/shader.frag.glsl [workspace]/out/shaders/shader.frag [path/to/Kinc]/Build linux will compile shader.frag.glsl into SPIRV for Linux, and write the result to out/shaders/shader.frag

There are some additional options:

  • --debug
  • --version [version]
  • --outputintermediatespirv

I'm still not sure what --version means exactly - I'm guessing it means the version for the output? But is it the version of the target API? (eg: Vulkan 1.3) Or is it the version of the output file? (eg: spirv 1.5)

Reguardless, this is enough inform…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@RobDangerous
Comment options

Answer selected by bluesillybeard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants