Skip to content

Commit

Permalink
Added multi-page atlas docs
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Nov 2, 2023
1 parent 6864955 commit 8e7dbb8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/en/manuals/atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ Inner Padding
Extrude Borders
: The number of edge pixels that should be repeatedly padded around each image. When the fragment shader samples pixels at the edge of an image, pixels of a neighbor image (on the same atlas texture) may bleed over. Extruding the border solves this problem.

Max Page Size
: The maximum size of a page in a multi-page atlas. This can be used to split an atlas into multiple pages of the same atlas to restrict atlas size while still only using a single draw call. This feature must be used in combination with multi-page atlas enabled materials found in `/builtins/materials/*_paged_atlas.material`.

![Multi-page atlas](images/atlas/multipage_atlas.png)

Rename Patterns
: A comma (´,´) separated list of search-and-replace patterns, where each pattern is of the form `search=replace`.
Each image's original name (the file base name) will be transformed using these patterns. (E.g. a pattern of `hat=cat,_normal=`, will rename an image of name `hat_normal` to `cat`). This is useful when matching animations between atlases.

Here are examples of the different property settings with four square images of size 64x64 added to an atlas. Notice how the atlas jumps to 256x256 as soon as the images won't fit 128x128, resulting in much wasted texture space.

![Atlas properties](images/atlas/atlas_properties.png){srcset="images/atlas/atlas_[email protected] 2x"}
Expand Down
Binary file added docs/en/manuals/images/atlas/multipage_atlas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/manuals/images/atlas/single_images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8e7dbb8

Please sign in to comment.