public struct SimpleConstructedStruct
{
public readonly float OutFloat;
public SimpleConstructedStruct(float outFloat)
{
OutFloat = outFloat;
}
}
...
SimpleConstructedStruct s = new SimpleConstructedStruct(1.0f);
This would be fantastic -- it would also be fantastic if "readonly struct" works. Shaders shouldn't care about it, so we'd just need to make sure that it's ignored in whatever way is needed.
For example:
Should become: