Added PSXMesh, deindexes tris, converts them into primitives for the PSX

This commit is contained in:
2025-03-13 12:37:23 +01:00
parent f26fb5e467
commit 1e480f6c15
2 changed files with 61 additions and 3 deletions

View File

@@ -9,6 +9,9 @@ namespace PSXSplash.RuntimeCode
[HideInInspector]
public PSXTexture2D Texture;
[HideInInspector]
public PSXMesh Mesh;
public void CreatePSXTexture2D()
{
Renderer renderer = GetComponent<Renderer>();
@@ -18,6 +21,15 @@ namespace PSXSplash.RuntimeCode
Texture.OriginalTexture = texture;
}
}
public void CreatePSXMesh()
{
MeshFilter meshFilter = gameObject.GetComponent<MeshFilter>();
if (meshFilter != null)
{
Mesh = PSXMesh.CreateFromUnityMesh(meshFilter.mesh, Texture.Width, Texture.Height);
}
}
}
}