This project is to implement Weighted Blended OIT in Unity URP.I do this job in order to solve the transparency sorting problem when I do hair shading.
Reference:
Core idea:
Four weight functions:
First using alpha and depth to determind how much color it contribute(Ci), then let the albedo(basic color) multiply by Ci. Use linear addition to write the color contribution to the accumTexture.
Second using Blend 1 Zero OneMinusSrcAlpha blend order to write alpha to revealageTexture. Its main idea is that by subtracting alpha in turn, you can assume that the alpha of each translucent object affects the color of the background, and the more alpha accumulates, the greater the effect.
Finally using these two texture to blend with background: