Overload icon indicating copy to clipboard operation
Overload copied to clipboard

Support for shader includes

Open adriengivry opened this issue 4 years ago • 2 comments

Problem this feature should fix Some shaders are implementing the same functions instead of sharing them.

Expected solution It could be nice to have to possibility to include some "Shader function file" into our shaders. We can imagine a standard #include ... directive that can be parsed by our shader loader and replaced by the content of the file to include.

adriengivry avatar Jun 12 '20 22:06 adriengivry

How about this: https://github.com/nothings/stb/blob/master/stb_include.h? 🙂

demurzasty avatar Oct 13 '20 00:10 demurzasty

@demurzasty Could do the trick! I've actually started to work a bit on this, I have a branch for it: https://github.com/adriengivry/Overload/tree/feature/shader_preprocessor

Only WIP stuff, I've moved to OvRendering future-proof refactoring

adriengivry avatar Oct 13 '20 00:10 adriengivry