ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.65k stars 491 forks source link

Shader reflection is incomplete #234

Closed vlmillet closed 2 years ago

vlmillet commented 2 years ago

On the description of the main project page, it is said that cross platform Shader Reflection is available, but digging into it I'm unable to find the Data Type / Struct Members reflection anywhere (like SPIRV does for example). ShaderReflection class only seems to give resource kind and size but not data type reflection which is mandatory to use it for generic binding purposes.

Moreover, vertex input reflection does not include vertex attribute location which is necessary to fill up the VertexAttrib struct passed to the addPipeline function (maybe there is another way to get this location somewhere from the name ?)

I'm porting my Vulkan engine to TheForge and I am unable to have SPIRV reflection equivalent to expose shader uniform UI, auto bind vertex attribute or make debug type-checks as I did before.

Have I missed something anywhere ?

If not I can help contribute to add it to TheForge if you want, at least for the Vulkan API as a first step because I mostly know this API (other APIs could fallback to empty data type reflection while waiting for them to be implemented).

manas-kulkarni commented 2 years ago

Thanks for reporting the issue. It is possible, we missed some of the variable reflection. Would you be interested in joining our internal repository where we develop the framework and add the missing reflection data?

vlmillet commented 2 years ago

Yes of course !

wolfgangfengel commented 2 years ago

Can you please send me your e-mail. I suggest you use Discord and a private chat ...

vlmillet commented 2 years ago

I sent you an email through the The-Forge contact section.

wolfgangfengel commented 2 years ago

Should be resolved?