Browse Source

Added note on sprite trimming and slice-9

Björn Ritzl 2 years ago
parent
commit
8b950d10ef
2 changed files with 5 additions and 1 deletions
  1. 1 1
      docs/en/manuals/atlas.md
  2. 4 0
      docs/en/shared/slice-9-texturing.md

+ 1 - 1
docs/en/manuals/atlas.md

@@ -81,7 +81,7 @@ Size
 : The width and height of the image (read-only).
 : The width and height of the image (read-only).
 
 
 Sprite Trim Mode
 Sprite Trim Mode
-: How the sprite is rendered. The default is to render the sprite as a rectangle (Sprite Trim Mode set to Off). If the sprite contains a lot of transparent pixels it may be more efficient to render the sprite as a non rectangular shape using between 4 and 8 vertices.
+: How the sprite is rendered. The default is to render the sprite as a rectangle (Sprite Trim Mode set to Off). If the sprite contains a lot of transparent pixels it may be more efficient to render the sprite as a non rectangular shape using between 4 and 8 vertices. Note that sprite trimming does not work together with slice-9 sprites.
 
 
 Image
 Image
 : Path to the image itself.
 : Path to the image itself.

+ 4 - 0
docs/en/shared/slice-9-texturing.md

@@ -28,6 +28,10 @@ The *Slice9* texture scaling described above is only applied when you change box
 If you change scale parameter of the box node or sprite (or on the game object) - the node or sprite and texture is scaled without applying *Slice9* parameters.
 If you change scale parameter of the box node or sprite (or on the game object) - the node or sprite and texture is scaled without applying *Slice9* parameters.
 :::
 :::
 
 
+::: important
+When using slice-9 texturing on Sprites the [Sprite Trim Mode of the image](https://defold.com/manuals/atlas/#image-properties) must be set to Off.
+:::
+
 
 
 ### Mipmaps and slice-9
 ### Mipmaps and slice-9
 Due to the way mipmapping works in the renderer, scaling of texture segments can sometimes exhibit artifacts. This happens when you _scale down_ segments below the original texture size. The renderer then selects a lower resolution mipmap for the segment, resulting in visual artifacts.
 Due to the way mipmapping works in the renderer, scaling of texture segments can sometimes exhibit artifacts. This happens when you _scale down_ segments below the original texture size. The renderer then selects a lower resolution mipmap for the segment, resulting in visual artifacts.