texture_load_settings

The settings used when loading images using the graphics module

c3d.graphics

different formats with different settings have diffirent outputs. this documents them

mixing mipmap levels

you wanna make sure you never mix mipmap levels of 2 textures, For example with transparency masks. You always want the mask to have the same amount of mipmap levels as the texture does otherwise you will run into problems!

.ppm

options:

:get_out() results

.cimg2

options

.nfp

examples

local epik_texture = c3d.graphics.load_texture("epik.ppm",{quantize_amount=2,dither=true}) -- loads the texture with the given settings
    :get_out().quantized:apply_palette() -- gets the output and runs the apply_palette method of the palette object
local epik_texture = c3d.graphics.load_texture("epik.nfp",{
    transparency = c3d.graphics.load_texture("transparency.nfp")
}) -- loads a texture and asigns another as its transparency map
local epik_texture = c3d.graphics.load_texture("epik.nfp",{
    transparency = c3d.graphics.load_texture("transparency.nfp",{mipmap_levels=5}),
    mipmap_levels=5
}) -- loads a texture and asigns another as its transparency map