Files
Pal3.Unity/Assets/Scripts/Engine/DataLoader/DxtTextureLoader.cs
T
Jiaqi (0x7c13) Liu 9cda701b13 Optimize DDS texture creation and static POL meshes
Separate file decoding from Unity upload through format-neutral texture data
and explicit world, sprite and skybox policies. Validate DDS layouts, preserve
alpha coverage and use native BC uploads with software RGBA fallback.

Compact referenced POL vertices and batch nearby static opaque groups sharing
materials. Keep water and dynamic geometry separate, with source ranges retained
only in the Editor. Add DDS layout and POL index regression tests.

Validation: PAL3 and PAL3A each passed 24 Editor tests, eight combined Game and
ResourceViewer style regressions, 936 paired skybox comparisons, and both macOS
Player builds on Metal. Editor provenance and Core tests are excluded from Players.
2026-11-12 11:35:23 +08:00

21 lines
748 B
C#

// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2025, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Engine.DataLoader
{
using Core.Abstraction;
using Pal3.Core.DataReader.Dxt;
public sealed class DxtTextureLoader : ITextureLoader
{
public ITextureDataSource Load(byte[] data, out bool hasAlphaChannel)
{
var image = new DxtImage(data);
hasAlphaChannel = image.HasAlphaChannel;
return new DxtTextureDataSource(image);
}
}
}