No way to specify explicit binding for vertex shader inputs
Hyp-X opened this issue · 3 comments
I found the -EB flag which translates the binding/location of samplers, constant buffers and fragment shader outputs.
However GLSL also allows layout(location = #) on vertex shader inputs.
There should be a way to map HLSL input semantics to GLSL binding locations.
For example:
POSITION 0
NORMAL 1
TEXCOORD0 2
etc.
This map could be passed in Xsc::ShaderInput for the library.
(Or appropriate command line flags for xsc.exe eg: -STEXCOORD0=2)
Yes, it's an open issue, but it's not my current main focus,
since there are still problems with the I/O semantics translation.
E.g. when a struct is used as input and output.
If you have a good solution for this issue, let me know.
Is it an urgent demand for you?
You don't have to do this urgently I just thought I create this issue as a reminder.
I'll check how hard is it to implement it myself.
I need this in a hobby project I try to use XShaderCompiler in.
Completed with 2487ebf5a032c7d6f4f5f8ce24c4f4f4c4f17085