Skip to content

Commit

Permalink
[unity] Changelog documentation updated for added support for Unity's…
Browse files Browse the repository at this point in the history
… SpriteMask. See #941.
  • Loading branch information
HaraldCsaszar committed Feb 19, 2019
1 parent 17c19a9 commit cac764f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Expand Up @@ -136,6 +136,21 @@
* `sRGB (Color Texture)` shall be disabled when `Generate Mip Maps` is enabled, otherwise you will receive white border outlines.
* `Alpha Is Transparency` shall be disabled on `Premultiply alpha` textures, otherwise you will receive light ghosting artifacts in transparent areas.
* These warnings can be disabled in `Edit - Preferences - Spine`.
* **Sprite Mask Support for all Included Shaders** The `Skeleton Animation` and `Skeleton Mecanim` components now provide an additional `Mask Interaction` field in the Inspector, covering identical functionality as Unity's built in `Sprite Renderer` component:
* `Mask Interaction` modes:
* `None` - The sprite will not interact with the masking system. Default behavior.
* `Visible Inside Mask` - The sprite will be visible only in areas where a mask is present.
* `Visible Outside Mask` - The sprite will be visible only in areas where no mask is present.
* `Automatically Generated Materials` When switching `Mask Interaction` modes in the Inspector outside of Play mode, the required additional material assets are generated for the respective `Stencil Compare` parameters - with file suffixes `'_InsideMask'` and `'_OutsideMask'`, placed in the same folder as the original materials. By default all generated materials are kept as references by the `Skeleton Animation` component for switching at runtime.
These materials can be managed and optimized via the `SkeletonAnimation`'s `Advanced` section:
* Using the `Clear` button you can clear the reference to unneeded materials,
* Using the `Delete` button the respective assets are deleted as well as references cleared. Note that other `Skeleton Animation` GameObjects might still reference the materials, so use with caution!
* With the `Set` button you can again assign a link to the respective materials to prepare them for runtime use. If the materials were not present or have been deleted, they are generated again based on the default materials.
* When switching `Mask Interaction` mode at runtime, the previously prepared materials are switched active automatically. When the respective materials have not been prepared, material copies of the default materials are created on the fly. Note that these materials are not shared between similar `Skeleton Animation` GameObjects, so it is recommended to use the generated material assets where possible.
* **Every shader now exposes the `Stencil Compare` parameter** for further customization. This way you have maximum flexibility to use custom mechanisms to switch materials at runtime if you should ever need more than the three materials generated by `Skeleton Animation`'s `Mask Interaction` parameter. Reference `Stencil Compare` values are:
* `CompareFunction.Disabled` for `Mask Interaction - None`
* `CompareFunction.LessEqual` for `Mask Interaction - Visible Inside Mask`
* `CompareFunction.Greater` for `Mask Interaction - Visible Outside Mask`

### XNA/MonoGame
* Added support for any `Effect` to be used by `SkeletonRenderer`
Expand Down

0 comments on commit cac764f

Please sign in to comment.