-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement GetParameterBySemantic #3827
Comments
Note I originally skipped implementing this because to me it seemed the parameter name and semantic were largely duplicate information. Why look up by semantic if you can by name? |
normally semantics are used when the engine fills the pipeline with default data (view, projection matrices) while allowing developers to use their own programming code design guidelines. |
@gabereiser - I'd love to see one example of where semantics are more useful than the name. |
@tomspilman my own engine reactor, uses it to hydrate shaders. https://github.com/gabereiser/reactor |
Since MonoGame does not support semantics, we had to rename all our effect parameters to match the semantic name. No big deal, but I personally prefer using semantics:
So I would argue semantics are not essential, but "really nice to have". |
To implement
EffectParameterCollection.GetParameterBySemantic()
we need to first extend the MGFX parser to parse out semantics in parameter definitions. We can then include the semantic in the compiled .mgfx file and used from theEffectParameterCollection
andEffectParameter
types.The text was updated successfully, but these errors were encountered: