Phase 6 updates

Phase 6 · Slice 62 ·

Image effects (OnRenderImage)

  • Without a scriptable pipeline, a screen camera's scripts' OnRenderImage(source, destination) run after its other callbacks, in component order, each given the last one's result (ImageEffects, CoreModule). They're recorded: source and destination are stand-ins for the camera's color and textures of the camera's render graph, RenderTexture.GetTemporary meanwhile gives more of them (any size), and each Graphics.Blit becomes a graph pass, a copy or a project material's pass (every pass for -1) with a material of its own (one material can be blitted several times in a chain). The last destination is the camera's color, so the result lands where the camera draws: under later cameras and the overlay UI.
  • Graph passes copy without a material (source, API 57: NativeGraphPass is 32 bytes) and draw vertex functions that read vertices as the blit quad, through a camera slot of its own (BLIT_CAMERA) and an identity draw slot; the material blit into render textures shares the quad and camera.
  • Not yet: OnRenderImage on cameras with a target texture, blits inside it into the project's own render textures or copies from outside textures (they warn), [ImageEffectOpaque], Material.passCount (it's 1).
  • Checked by render_graph_passes_copy_and_draw_blit_quads and on_render_image_effects_run_on_the_cameras_image.
  • Next: Shader Graph; SSAO.