Skip to content

Commit

Permalink
Fix some incorrect types
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Dec 21, 2024
1 parent f07129f commit 4290c05
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,17 @@ private void ImportMaterials()
if (aiMaterial.HasBumpScaling)
material.OpaqueData.Add("BumpScaling", aiMaterial.BumpScaling);
if (aiMaterial.HasColorAmbient)
material.OpaqueData.Add("AmbientColor", (Color)aiMaterial.ColorAmbient);
material.OpaqueData.Add("AmbientColor", (Vector4)aiMaterial.ColorAmbient);
if (aiMaterial.HasColorDiffuse)
material.OpaqueData.Add("DiffuseColor", (Color)aiMaterial.ColorDiffuse);
material.OpaqueData.Add("DiffuseColor", (Vector4)aiMaterial.ColorDiffuse);
if (aiMaterial.HasColorEmissive)
material.OpaqueData.Add("EmissiveColor", (Color)aiMaterial.ColorEmissive);
material.OpaqueData.Add("EmissiveColor", (Vector4)aiMaterial.ColorEmissive);
if (aiMaterial.HasColorReflective)
material.OpaqueData.Add("ReflectiveColor", (Color)aiMaterial.ColorReflective);
material.OpaqueData.Add("ReflectiveColor", (Vector4)aiMaterial.ColorReflective);
if (aiMaterial.HasColorSpecular)
material.OpaqueData.Add("SpecularColor", (Color)aiMaterial.ColorSpecular);
material.OpaqueData.Add("SpecularColor", (Vector4)aiMaterial.ColorSpecular);
if (aiMaterial.HasColorTransparent)
material.OpaqueData.Add("TransparentColor", (Color)aiMaterial.ColorTransparent);
material.OpaqueData.Add("TransparentColor", (Vector4)aiMaterial.ColorTransparent);
if (aiMaterial.HasOpacity)
material.OpaqueData.Add("Opacity", aiMaterial.Opacity);
if (aiMaterial.HasReflectivity)
Expand Down Expand Up @@ -680,7 +680,7 @@ private GeometryContent CreateGeometry(MeshContent mesh, Mesh aiMesh)
geom.Vertices.Channels.Add(VertexChannelNames.TextureCoordinate(i), aiMesh.TextureCoordinateChannels[i].Select(s => new Vector2(s.X, s.Y)));

for (var i = 0; i < aiMesh.VertexColorChannelCount; i++)
geom.Vertices.Channels.Add(VertexChannelNames.Color(i), aiMesh.VertexColorChannels[i].Select(s => (Vector4)s));
geom.Vertices.Channels.Add(VertexChannelNames.Color(i), aiMesh.VertexColorChannels[i].Select(s => (Color)s));

return geom;
}
Expand Down

0 comments on commit 4290c05

Please sign in to comment.