INNER CODE UNIT · Python

SlotConfig

untoldengine/UntoldEngine · scripts/texbake.py:149

class SlotConfig:
    srgb: bool
    block_size: str    # e.g. "4x4"
    block_w: int
    block_h: int
    pixel_format: int  # MTLPixelFormat raw value
    generate_mips: bool = True  # LUT strips must never be mip-filtered — see "lut" slot below.
    encoding: str = "astc"


_SLOT_CONFIG: dict[str, SlotConfig] = {
    "base_color": SlotConfig(srgb=True,  block_size="4x4", block_w=4, block_h=4, pixel_format=MTL_ASTC_4X4_SRGB),
    "emissive":   SlotConfig(srgb=True,  block_size="4x4", block_w=4, block_h=4, pixel_format=MTL_ASTC_4X4_SRGB),
    "normal":     SlotConfig(srgb=False, block_size="4x4", block_w=4, block_h=4, pixel_format=MTL_ASTC_4X4_LDR),
    "roughness":  SlotConfig(srgb=False, block_size="6x6", block_w=6, block_h=6, pixel_format=MTL_ASTC_6X6_LDR),
    "metallic":   SlotConfig(srgb=False, block_size="6x6", block_w=6, block_h=6, pixel_format=MTL_ASTC_6X6_LDR),
    "occlusion":  SlotConfig(srgb=False, block_size="6x6", block_w=6, block_h=6, pixel_format=MTL_ASTC_6X6_LDR),
    "orm":        SlotConfig(srgb=False, block_size="6x6", block_w=6, block_h=6, pixel_format=MTL_ASTC_6X6_LDR),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…