Open cykoder opened 1 year ago
Shaderc does not check the source for shader versions, the shader version is set when you invoke shaderc
Eg: shaderc -platform linux -p 120
compiles a GLSL 120 shader.
The best way to have diverging shader versions would be to have diverging shaderc invocations in your makefile
Shaderc does not check the source for shader versions, the shader version is set when you invoke shaderc
This I am aware of, thats the feature request. While its easy to say just diverge in the makefile its a bit of a pain to setup for just one or two shaders. Atleast the way I have it atm, on make the shaders are compiled from directory structure like: engine/shaders/xyz1, engine/shaders/xyz2, engine/shaders/xyz3
if xyz2 uses a diff version, exlcuding it and invoking shaderc again is a bit painful. especially when its only GLSL/OpenGL that needs updating
I have my pipeline setup well so that I only need to invoke shaderc from a single source (like the example shader Makefiles). Works great, but for only a few shaders I require a higher shader version. Setting the standard GLSL
#version 430
or whatever doesnt work and produces errors when trying to compile.I don't see that shaderc checks for existing version definitions, could it? I'm not sure how to best address defining the versions across different compilation targets. Perhaps it'd require something like:
(but i find this ugly)
Thoughts/concerns? I am happy to try contribute this feature if a decision can be made on above