Add new PreIntegratedGF with 80% smaller but more accurate data
Update old generation code, use R16G16_UNorm format instead of R11G11B10, skip mips and reduce Y axis to 32 pixels. #1492
This commit is contained in:
@@ -707,6 +707,8 @@ bool TextureTool::ImportTextureDirectXTex(ImageType type, const StringView& path
|
||||
PixelFormat targetFormat = TextureTool::ToPixelFormat(options.Type, width, height, options.Compress);
|
||||
if (options.sRGB)
|
||||
targetFormat = PixelFormatExtensions::TosRGB(targetFormat);
|
||||
if (options.InternalFormat != PixelFormat::Unknown)
|
||||
targetFormat = options.InternalFormat;
|
||||
DXGI_FORMAT targetDxgiFormat = ToDxgiFormat(targetFormat);
|
||||
|
||||
// Check mip levels
|
||||
|
||||
@@ -121,6 +121,10 @@ API_CLASS(Namespace="FlaxEngine.Tools", Static) class FLAXENGINE_API TextureTool
|
||||
API_FIELD(Attributes="HideInEditor")
|
||||
Array<Sprite> Sprites;
|
||||
|
||||
// The custom format to use. Can be used to override default format from texture Type.
|
||||
API_FIELD(Attributes="HideInEditor")
|
||||
PixelFormat InternalFormat = PixelFormat::Unknown;
|
||||
|
||||
// Function used for fast importing textures used by internal parts of the engine
|
||||
Function<bool(TextureData&)> InternalLoad;
|
||||
|
||||
|
||||
@@ -527,6 +527,8 @@ bool TextureTool::ImportTextureStb(ImageType type, const StringView& path, Textu
|
||||
PixelFormat targetFormat = ToPixelFormat(options.Type, width, height, options.Compress);
|
||||
if (options.sRGB)
|
||||
targetFormat = PixelFormatExtensions::TosRGB(targetFormat);
|
||||
if (options.InternalFormat != PixelFormat::Unknown)
|
||||
targetFormat = options.InternalFormat;
|
||||
|
||||
// Check mip levels
|
||||
int32 sourceMipLevels = textureDataSrc->GetMipLevels();
|
||||
|
||||
Reference in New Issue
Block a user