Sorting Fudge is a special property included in Unity's legacy particle system (Shuriken) renderer (Particle System Renderer) for translucent sort order control. You can add a "bias" to the priority when drawing translucent materials, and draw them in a specific order, ignoring the physical distance from the camera.
Real-world analogy: movie theater seat reservation system and ``favoritism priority''
The operation of Sorting Fudge can be compared to ``a slight favoritism towards a specific customer (falsification of serial number) in a movie theater seat reservation system''.
- Conventional (no sort adjustment): The order of entry into the movie theater (the order in which translucent objects are drawn) is determined mechanically based purely on the "physical distance relationship (closeness to the center of gravity)" from the camera (screen). However, if a short child (the effect you want to draw in the background) and a tall adult (the water surface in the background that you want to draw in the foreground) are lined up at approximately the same distance, the system will make a misjudgment and the child will overlap in front of the adult, unnaturally blocking their view.
- Sorting Fudge Solution: Adds a bit of "bias" to the system's distance calculations. By adding a bias of ``+50 (towards the back)'' to the child's serial number, even if the child is physically lined up with the adult, the entrance control system will force the child to be placed behind the adult, and the order will be corrected so that the child (particle) is beautifully hidden behind the adult (water surface).
Figure: Infographic of bias shift of object calculation depth and drawing order control using Sorting Fudge value
Detailed judgment logic
In Unity's rendering pipeline, translucent objects are drawn after opaque objects are drawn, sorted in Back-to-Front order from the camera. At this time, the drawing priority is calculated based on the distance between the "centroid" of each object's bounding box and the camera. However, when a large particle intersects with a small water surface, the calculation may go awry and the context may move back and forth unnaturally.
Sorting Fudge subtracts or adds the specified value to the calculated distance to this camera. If the value is "positive", it will be determined to be far from the camera and will be drawn first (behind). Conversely, if it is a "negative" value, it will be determined to be closer to the camera and will be drawn later (in front).