Comments (7)
This crate seems pretty dead (last updated 3 years ago).
But if you're doing raytracing you might aswell compile spir-v shaders properly either at compile time or runtime with something like the shaderc Rust bindings
from glsl-to-spirv-macros.
I couldn't figure out how to use shaderc at compile time.
from glsl-to-spirv-macros.
I couldn't figure out how to use shaderc at compile time.
I guess you can put the shader compilation inside build.rs
?
from glsl-to-spirv-macros.
@JakubKoralewski Why yes and alternatively build.rs
can call a command line compiler. Neither solution addresses the same problems this crate does.
For example how does that inline glsl? With that solution the glsl would either be in build.rs
or in separate files. It's not obvious how to have build.rs
parse glsl out of *.rs source files.
from glsl-to-spirv-macros.
It's not obvious how to have build.rs parse glsl out of *.rs source files.
I don't understand what you mean by that.
For example how does that inline glsl? With that solution the glsl would either be in build.rs or in separate files.
You can look at this example of mine. I precompile all the .spv
shaders in the shaders
directory and save them with the added .spv
extension.
In actual application code I use the include_bytes!
macro like here, which will inline the bytes into the compiled binary.
Is that what you meant?
from glsl-to-spirv-macros.
"Inline" rust code and glsl existing in a single file. That's what this crate does and the solution it offers that others don't.
from glsl-to-spirv-macros.
Hence: I couldn't figure out how to use shaderc at compile time. At runtime shaderc is the obvious solution.
from glsl-to-spirv-macros.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glsl-to-spirv-macros.