stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.65k stars 957 forks source link

Fix shader bool generics to appear in the editor #2405

Closed Basewq closed 3 months ago

Basewq commented 4 months ago

PR Details

Bug in editor where declaring a shader, eg.

shader MyShader<bool ShaderArg>
{
}

won't show the bool argument in the editor when used as a material shader, and you won't be able to build the shader due to the missing parameter.

This fix exposes the bool argument to the editor and allows it to save/load properly.

Also added a separate commit to simplify the type checking.

Types of changes

Checklist

Eideren commented 3 months ago

Thanks !