Shader Parameter Semantics Not Read By Content Pipeline?


I have just tried to read semantics I have put in one of my shaders, but when I check the Effect.Parameter[].Semantic, they are always empty strings.

Is it the case that MonoGame does not read them :frowning: Will it ever as it would help greatly when creating independence from objects and effects.

Thanks in advance :slight_smile:

I took a quick look at the source code and it seems like they are read. Maybe they’re not written out though. 2MGFX is responsible for effect building and writing out all reflection metadata like parameters. If you want to dig into this yourself that’s probably the place to look. If not it’s best to open an issue on GitHub so someone else might fix it.

1 Like

Cool, thanks for taking a look.

I am still getting my head back into the world of XNA/MonoGame, I have been using Unity3D since XNA was culled, so I have a tonne to remember, so I may take a look at this myself, but would be much later on. I am surprised that it has not been requested already :confused: I would have thought it would be a much needed element for engine development and if you want to have effect and object independence.

I searched the issues and found
You’re not the first. This needs to be implemented in 2MGFX.

1 Like

Ah OK, hope it gets added, semantics and annotations are v useful.

Thanks again :smiley: