Replies: 3 comments
-
Not yet :-) This is one feature of the OSG's #pragma(tic) shader composition I didn't implement, it's been in my long term TODO list, leaving it off the immediate TODO list till we had a really pressing need for it. Essentially in ShaderCompileSettings we'd need a pair of std::map<std::string, std::string> rather than a std::setstd::string. It's not a huge block of work if, but I've always had other more pressing items on my TODO list so far, there's a chance I might have some time later this month to tackle it. |
Beta Was this translation helpful? Give feedback.
-
Thanks Robert! This came up as I was looking to support different VSG versions in a shader. Version 1.1.3 changed the view dependent state buffer from a UBO to an SSBO so I wanted to temporarily support both (since vcpkg's VSG is still on 1.1.2). I do realize this is somewhat silly and I have submitted a PR to vcpkg to update VSG to version 1.1.7. So there is certainly no rush :) |
Beta Was this translation helpful? Give feedback.
-
FYI, it should be possible to set the VIewDependetState types via it's public API and by customizing the ShaderSet. I wonder if we should provide the version to shaders as #define in some capacity. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to inject a shader define with a value? This didn't work:
shaderHints->defines.emplace("MY_DEFINE=42");
Beta Was this translation helpful? Give feedback.
All reactions