Get link-time constants using the reflection API #5664
-
Hi, I was wondering if it was possible to get a similar behavior using link-time constants, but currently I haven't found a way to retrieve it using reflection and the documentation doesn't mention it, so maybe this feature doesn't exists yet ? Also if you see a better way of handling my use case that would be great too. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Can you give us examples with shader code? |
Beta Was this translation helpful? Give feedback.
-
@tangent-vector Do you have an answer for the immediate question about discovering "WITH_NORMAL_MAP" in reflection so a module can be generated with an override for that constant defined? |
Beta Was this translation helpful? Give feedback.
-
-- |
Beta Was this translation helpful? Give feedback.
I think you came up with a nice trick to generate the shader permutation.
Unfortunately I don't think you can get the names of those variables because they are not "shader parameters" that can be bound at runtime.
I like to suggest you to file an issue with a smallest repro code as examples; probably you can just copy and paste from this discussion.
Then, we will be able to schedule for the work with respect to the priorities for other milestone goals.
I also like to encourage you to implement it for us and push to the repo. It will be highly appreciated by the team.