Skip to content

Commit

Permalink
Changed default max width and height in tex exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
fLindahl committed Nov 13, 2024
1 parent e02d587 commit 10b13fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions toolkit/toolkitutil/model/import/gltf/ngltfexporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ NglTFExporter::ParseScene()
TextureAttrs attrs;
attrs.SetPixelFormat(TextureAttrs::BC5);
attrs.SetFlipNormalY(true);
attrs.SetMaxHeight(8192);
attrs.SetMaxWidth(8192);

int32_t imageIndex = gltfScene.textures[material.normalTexture.index].source;
Gltf::Image const& image = gltfScene.images[imageIndex];
Expand All @@ -115,6 +117,8 @@ NglTFExporter::ParseScene()
TextureAttrs attrs;
attrs.SetMipMapFilter(TextureAttrs::Filter::Kaiser);
attrs.SetScaleFilter(TextureAttrs::Filter::Kaiser);
attrs.SetMaxHeight(8192);
attrs.SetMaxWidth(8192);
attrs.SetColorSpace(TextureAttrs::sRGB);

int32_t imageIndex = gltfScene.textures[material.pbrMetallicRoughness.baseColorTexture.index].source;
Expand All @@ -140,6 +144,8 @@ NglTFExporter::ParseScene()
TextureAttrs attrs;
attrs.SetScaleFilter(TextureAttrs::Kaiser);
attrs.SetMipMapFilter(TextureAttrs::Kaiser);
attrs.SetMaxHeight(8192);
attrs.SetMaxWidth(8192);

int32_t imageIndex = gltfScene.textures[material.pbrMetallicRoughness.metallicRoughnessTexture.index].source;
Gltf::Image const& image = gltfScene.images[imageIndex];
Expand Down
4 changes: 2 additions & 2 deletions toolkit/toolkitutil/texutil/textureattrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ using namespace Util;
/**
*/
TextureAttrs::TextureAttrs() :
maxWidth(2048),
maxHeight(2048),
maxWidth(4096),
maxHeight(4096),
genMipMaps(true),
pixelFormat(BC7),
mipMapFilter(Point),
Expand Down

0 comments on commit 10b13fc

Please sign in to comment.