Texture and clut packing, All important information starts to join in one place for final export

This commit is contained in:
2025-03-11 12:32:22 +01:00
parent 10c2186966
commit 00c94d732b
8 changed files with 333 additions and 90 deletions

View File

@@ -4,13 +4,19 @@ namespace PSXSplash.RuntimeCode
{
public class PSXObjectExporter : MonoBehaviour
{
public PSXBPP BitDepth;
public PSXMesh Mesh;
//ublic PSXTexture Texture;
[HideInInspector]
public PSXTexture2D Texture;
public void Export()
public void CreatePSXTexture2D()
{
Debug.Log($"Export: {name}");
Renderer renderer = GetComponent<Renderer>();
if (renderer != null && renderer.sharedMaterial != null && renderer.sharedMaterial.mainTexture is Texture2D texture)
{
Texture = PSXTexture2D.CreateFromTexture2D(texture, BitDepth);
Texture.OriginalTexture = texture;
}
}
}
}