Nevitiv

  • 28 juil. 2023
  • Inscrit 29 janv. 2021
  • @Nevitiv Thanks for the additional info. I just checked the behaviour of the outline shaders with multiple atlas pages. I just noticed I forgot that it is mandatory that all materials are using shaders with ZWrite enabled. Otherwise the second draw call using the second material will draw the undesired inner outline on top of the already rendered parts of the previous draw call of the same character.

    So you basically have some options to:

    • a) Repack the skin (or pack your atlas so that it uses only one atlas page texture) to use a single atlas texture, then the outline is rendered behind the whole skeleton.
    • b) Use a provided Spine shader that has ZWrite enabled (also called "Write to depth" or "Depth write") or create a modified version of a provided outline shader where ZWrite is enabled at the normal pass.
    • c) Render the skeleton normally using a non-outline material, and use the RenderExistingMesh component to render the outline-only-skeleton behind the skeleton with a material using the shader Spine/Outline/OutlineOnly-ZWrite.