Open cykoder opened 1 year ago
Why solution is multiple mains and #ifdefery when it could be just providing ability to set FragData type?
I would prefer the ability to set the FragData type of course, just mentioning that can also be another solution + it may be helpful in other scenarios whereby user wishes to define more inputs that BGFX doesnt generate. Could be seen as two separate issues but one also helps fix the other, albeit with hacky ifdefs
You could already have this hacky shader with GLSL if you use --raw
argument.
Currenly the output type is just hardcoded to vec4, I have a use case where I want to write to uint textures. In GLSL its possible to do like:
But theres no way to do this for SPIRV/HLSL this way. It also does not allow overriding of
void main()
for HLSL shaders, which could also be a solution to this issue. Example: