decentraland / decentraland/asset-bundle-converter

Revisit texture importer settings differences between GLTF and standalone texture paths

Open
#256 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4
Forks
8
Avg merge
26m
Merged PRs (30d)
1

Description

## Context

There are two code paths that configure texture importer settings, and they set different properties with no clear reason for the divergence:

**GLTF embedded textures** (`CustomGltfImporter.cs:FixTextureReferences`):
- `isReadable = false`
- `textureType` = NormalMap or Default (context-dependent)
- `sRGBTexture` = based on whether texture is metallic
- `compressionQuality = 100`
- `textureCompression = CompressedHQ`
- `mipmapEnabled = true`
- `ApplyBuildTargetTextureSettings`

**Standalone textures** (`AssetBundleConverter.cs:ImportTextures`):
- `isReadable = true`
- `alphaIsTransparency = true`
- `textureCompression = CompressedHQ`
- `ApplyBuildTargetTextureSettings`

## Differences to revisit

| Property | GLTF path | Standalone path |
|---|---|---|
| `isReadable` | `false` | `true` |
| `alphaIsTransparency` | not set | `true` |
| `sRGBTexture` | explicitly set | not set |
| `textureType` | explicitly set | not set |
| `compressionQuality` | `100` | not set |
| `mipmapEnabled` | `true` | not set |

## Action

Investigate whether these differences are intentional or accidental, and unify the settings where possible. Consider consolidating shared settings into `TextureUtils.ApplyBuildTargetTextureSettings` so both paths behave consistently.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.