Hello Guest

Author Topic: Dark fringes with LitPremulVertexColor shader in forward rendering path  (Read 3637 times)

JJC1138

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Hello.

I'm trying to use 2D Toolkit in a lit scene, and I'm using premultiplied alpha to get rid of dark fringes around transparent parts, so I have the 'Premultiplied Alpha' box checked in the sprite collection settings, and the LitPremulVertexColor shader assigned in the atlas material.

Everything looks fine when the scene camera is set to the VertexLit rendering path, but when I set it to use the Forward rendering path I get fringes around the edges of my transparent sprites as seen in the first attachment. Is this to be expected? The shader looks fine to me but it seems that something in Unity's forward rendering path is not premultiplied alpha-friendly. At first I thought it might be that I'm using a point light which adds another draw call in forward rendering, but I tried changing it to a directional light and that does get rid of the extra draw call but doesn't prevent the fringing.

I've attached a minimal test project that demonstrates the problem.