diff --git a/NiflySharp/NifFile.cs b/NiflySharp/NifFile.cs index 75a912d..43a2f4e 100644 --- a/NiflySharp/NifFile.cs +++ b/NiflySharp/NifFile.cs @@ -1970,7 +1970,8 @@ public NifFileOptimizeResult OptimizeFor(NifFileOptimizeOptions options) bsOptShape.Rotation = shape.Rotation; bsOptShape.Scale = shape.Scale; - bsOptShape.Create(Header.Version, geomData.Vertices, geomData.Triangles, geomData.UVSets, geomData.Normals); + // Honor the withoutNormals flag — ModelSpace shaders must drop normals. + bsOptShape.Create(Header.Version, geomData.Vertices, geomData.Triangles, geomData.UVSets, !withoutNormals ? geomData.Normals : null); bsOptShape.Flags_ui = shape.Flags_ui; // Restore old bounds for static meshes or when calc bounds is off