# Interface: RendererOptions

Defined in: [renderer.ts:6](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L6)

## Properties

### backend?

> `optional` **backend?**: `"2d"` \| `"webgl2"` \| `"auto"`

Defined in: [renderer.ts:8](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L8)

`auto` (default) uses WebGL2 and falls back to Canvas 2D; `webgl2` throws where it's unavailable.

***

### blendSpace?

> `optional` **blendSpace?**: `"srgb"` \| `"linear"`

Defined in: [renderer.ts:33](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L33)

Where ink meets paper. `srgb` (default) mixes the sRGB bytes, as CSS and Canvas 2D do: anti-aliased edges come
out dark, so dark-on-light text and shapes look heavier and light-on-dark ones thinner. `linear` mixes in linear
light, so swapping the two colours keeps the weight, and glows and soft edges add up like light. It draws into
an sRGB framebuffer and copies it to the canvas at `end()`, one extra full-screen pass. Colour images are
stored as sRGB; mark data images (MSDF atlases, lookup tables) with `asData` before their first draw. Custom
shaders receive linear colours and convert their own colour uniforms with `spryte_toLinear`. WebGL2 only:
the Canvas 2D fallback always mixes sRGB. Default `srgb`.

***

### mipmaps?

> `optional` **mipmaps?**: `boolean`

Defined in: [renderer.ts:17](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L17)

Build mip levels for every image on upload, so smooth images drawn well below their size (zoomed-out maps,
charts, thumbnails) stay steady instead of shimmering. Costs a third more GPU memory per image and a little
upload time. Sprite sheets need a few pixels of padding between frames, or neighbours bleed in at small sizes.
WebGL2 only: Canvas 2D ignores it. Pixel-art (`smooth: false`) draws are unaffected. Default false.

***

### smooth?

> `optional` **smooth?**: `boolean`

Defined in: [renderer.ts:10](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L10)

Linear filtering for images by default. Pass false for pixel art. Default true.

***

### transparent?

> `optional` **transparent?**: `boolean`

Defined in: [renderer.ts:23](https://github.com/debuffjp/debuff/blob/8c63a41ceef99b44f44b783b35121cc928cd37d7/packages/spryte/src/renderer.ts#L23)

See-through canvas: a clear colour with alpha (such as `"#0000"`) lets the page, or another canvas, show
through. For overlays, such as drawing particles over a PixiJS or DOM scene. Default false (opaque, which
lets the compositor skip blending).
