You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I was looking at building out a dynamic material binding system for my game, which basically would use the reflection to find the struct members by name and allow the game code to set values to these members using string references - something along the lines of this:
I can get enough information out of the reflection to find the resource sets and bindings, but can't seem to drill down deep enough to find the members of the structs, aka SunColor in this example. Am I just missing something in the existing API, or is this not currently exposed through the Veldrid SPIRV library? It looks to be possible using SPIRV Cross https://github.com/KhronosGroup/SPIRV-Cross/wiki/Reflection-API-user-guide#struct-member-reflection
If it is missing, I would be happy to have a go at adding this functionality if you would consider it for a PR.
Thanks
The text was updated successfully, but these errors were encountered:
This is missing, but it’s something I have wanted to add. The reflection info that is currently returned is kind of a minimal viable product — there’s a lot more useful stuff that could be exposed but isn’t at the moment.
Keep in mind that while you might be able to reflect over all of the fields always, I suspect that useful names will only be possible if the module was compiled with debug info to begin with.
Hi there,
I was looking at building out a dynamic material binding system for my game, which basically would use the reflection to find the struct members by name and allow the game code to set values to these members using string references - something along the lines of this:
Which in the shader could correspond to something like this
I can get enough information out of the reflection to find the resource sets and bindings, but can't seem to drill down deep enough to find the members of the structs, aka
SunColor
in this example. Am I just missing something in the existing API, or is this not currently exposed through the Veldrid SPIRV library? It looks to be possible using SPIRV Cross https://github.com/KhronosGroup/SPIRV-Cross/wiki/Reflection-API-user-guide#struct-member-reflectionIf it is missing, I would be happy to have a go at adding this functionality if you would consider it for a PR.
Thanks
The text was updated successfully, but these errors were encountered: