Scripting API

Scripting API

ImageSampling

Record struct in Abyss.Core, from Abyss.Core.

How an image made from pixels is drawn, which a file's import settings say for it: its filter, its wrap and how many mipmaps it has, made of its pixels — what an atlas of pixel art needs, new ImageSampling { Filter = ImportFilter.Point, MipLevels = 5 }. See World.SetImageSampling.

public readonly record struct ImageSampling

Constructors

ImageSampling

public ImageSampling()

Drawn as an image made from pixels starts: blended, tiled, no mipmaps.

Properties

Filter

public ImportFilter Filter { get; init; }

How a pixel covering more or fewer than a texel is colored; ImportFilter.Point for pixel art.

Wrap

public ImportWrap Wrap { get; init; }

What it is outside its own edges.

Anisotropy

public int Anisotropy { get; init; }

How many samples a slanted surface may take of it, 1 to 16; more need a blended filter.

MipLevels

public int MipLevels { get; init; }

How many levels it has, its own counted: 1 for no mipmaps, 0 for every level down to one texel, and more than it has for every level. An atlas stops at the level its tiles are one texel wide, so tiles do not run into each other: 5 for tiles of 16.