Texture and clut packing, All important information starts to join in one place for final export
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user