Pass ForgeDocs Product page

Manual

Performance notes

Recording a graph does not allocate. Measured on the outline sample by sampling GC allocated per frame over 240 frames with the renderer feature on, then another 240 with it off:

Bytes allocated per frame
Feature on23340
Feature off23401

The difference is negative, which means the graph's own allocation sits below the measurement noise of roughly 60 bytes against the editor's own baseline. Every node caches the strings it hands to Render Graph, because a name built inline is garbage on every frame for the life of the game.

The ready made effects hold to the same rule. On the effects showcase, with five screen looks stacked, highlights on three objects and an afterimage on a moving sphere, the main thread allocated 0 bytes per frame over 120 frames, exactly as with every effect off.

Most nodes record one Render Graph pass. Frame Texture and Alloc Texture record none, Blur Chain records one per pyramid step, Full Screen Effect adds a copy back when it cannot redirect camera color, and the ready made effects record several. Render Graph culls passes whose results nothing reads, except the few that must always run, such as a Persistent Texture clear or a Set Global Texture. Costs worth knowing about:

  • An Alloc Texture at a scale above 1 renders above camera resolution. It costs memory and fill rate on every frame, on every camera the graph runs on.
  • Draw Renderers with lighting data on sends light probes, lightmaps and shadow masks per object. Leave it off when the material is unlit.
  • Full Screen Effect redirects camera color rather than copying it back, so it costs one pass. It copies instead, which costs a second full screen pass, against the backbuffer, with MSAA on, and on a camera with other cameras stacked after it, whose picture has to stay where URP hands it on.
  • Preview In Edit Mode draws nothing while nothing Pass Forge draws moves; grain, noise and trails count as moving. While something moves, it draws the Game view and each Scene view up to the chosen rate, and nothing while Unity is in the background. Motion Trails, Feedback, Eye Adaptation and Datamosh move on by one step per drawn frame, so at 30 frames a second they run at about half the pace of a game at 60.
  • A graph runs per camera. Scene view and Game view are separate cameras, so an expensive graph costs twice while the Scene view is open. Turn off Run In Scene View on the renderer feature while profiling, or to keep an effect out of the editor viewport.
  • A graph made only of the ready made effect nodes, such as the two Set Up Effects adds, is left out of a camera's frame while nothing in it is on for that camera: no Volume effect above zero on a camera with Post Processing, no Highlight showing or flashing, and no Afterimage. URP then renders that camera as if the feature were not there, with no intermediate texture forced for it and no extra blit after post processing. A base camera with overlay cameras stacked on it still runs the graph, because URP sets up the whole stack from the base camera. A graph with any other node always runs.
  • Both effect graphs hold an Effect Mask node. A camera's marked objects are drawn into the mask once a frame, and the After Post graph reads the mask the Before Post graph drew, unless an upscaler such as STP changed the picture's size in between.
  • Blur Chain costs two passes per iteration, minus one. Four iterations is seven full screen passes, each smaller than the last. Lowering Start Scale is almost always cheaper than removing an iteration, and on a blurred result it is rarely visible.

The ready made effects record no pass at all while they have nothing to do: no enabled highlight or afterimage component, or every Volume effect at zero intensity. When they are on:

  • Stylize Stack costs one full screen pass for any mix of CRT, VHS, Pixelate and Retro.
  • Painterly costs a strokes pass at its Resolution Scale, whose cost grows with the square of Brush Size, plus a full resolution composite.
  • Motion Trails and Feedback each cost three passes and keep a history texture per camera at their Resolution Scale.
  • Highlight costs, per distinct profile on screen: one draw of each highlighted renderer into a mask, a few passes for an outline (full resolution below 6 pixels wide, half resolution from 6 pixels up, and a pass or two more for wider outlines), a small blur chain at half resolution and below for glow, and one composite. Highlighted renderers are drawn one by one, so thousands of highlighted objects are not what it is for.
  • Damage Numbers draw small quads only where characters are, after one copy of the screen, which is skipped when another gameplay effect drew that frame. Placing, stacking and writing the numbers allocates nothing. The Benchmark's Damage Numbers (32) step keeps the most that show at once, 32 numbers of eight characters, spread across the screen so that all 32 are drawn, and measures them on your device.
  • Route draws a quad around each piece of its line on the ground past Start Gap, 32 at most, after one copy of the screen. The copy is skipped only when Screen Warps, the one gameplay effect drawn before it, drew that frame and no Mask is in use; with a Mask in use, one more full screen pass puts back what the mask leaves out. Each pixel in those quads reads the depth once and measures its own piece; only those near the line go on to measure the pieces on either side and shade. A quad is cut where its piece passes behind the camera, and pieces are 2 m long for the first 8 m past Start Gap, so a piece beside or under a third-person camera covers only what shows of it. A first-person camera within Height Range of the ground, such as one crouching, stands inside the box around the piece under it, which then covers the whole screen. Until it is measured on the reference phone its cost is an estimate, the copy included: 0.4 to 1.2 ms of GPU time on a mid-range phone at 1080p. The Benchmark's Route, 30 m, Arrows step measures it on your device. Its path is found about once a second, and packing and drawing it allocates nothing.
  • Lens Blood costs one full screen pass, only while a splat shows. Pixels away from every splat cost one texture read, and those inside a splat a second read and its shapes, so its cost grows with how much of the screen the splats cover: a Shot In The Face over the whole lens costs the most, for its seconds. Landing, piling and drawing splats allocates nothing.
  • Afterimage set to World (the default) costs a draw of its ghosts, a draw of the objects into a mask while Hide Under Object is on, and a composite. Afterimages set to Screen, and those on Spine skeletons or sliced or tiled sprites, also cost a stamp draw on frames that leave a ghost, an accumulate pass and two copies, and keep two full resolution history textures per camera while their ghosts are on screen.