@pixi/3d
    Preparing search index...

    Function createDefaultGraph3D

    • Advanced

      Builds the render graph a View3D uses unless its graph option supplies one

      Start from it in a custom graph builder to add passes the Pass3D stages can't express. The passes run in this order, with each user pass built at its PassStage:

      1. The shadow pass.
      2. 'beforeOpaque' user passes.
      3. A depth reset over the view's rect, which clears each scene output but keeps any colour drawn before it, then the background and the opaque scene.
      4. 'afterOpaque' user passes.
      5. Copies of the opaque depth and colour, then the transmissive, blended-refraction and transparent scene. Blended-refraction draws don't write scene outputs.
      6. 'afterTransparent' user passes.
      7. The 'beforeToneMapping' effects, in array order, then the tone curve, then the 'afterToneMapping' effects. Unless the tone mapping is 'custom', an output pass applies the curve after a 'beforeToneMapping' effect, and the scene draw applies it otherwise.

      In composite mode the scene draws into textures at View3D#resolution, which the graph's other textures inherit unless an effect sets its own. The scene's textures are multisampled when the canvas has antialias, unless a scene output's format can't be (see SceneOutput). Each effect reads what the one before it wrote, and the last step stretches the image onto the view's rect.

      With a 'beforeToneMapping' effect enabled, the scene colour and every colour texture made without a format are rgba16float, so brightness above 1 reaches each of those effects. Unless the tone mapping is 'custom', the 'afterToneMapping' effects read rgba8unorm. An effect whose inputMips is set gets an input with mipmaps.

      The graph comes back compiled, so authoring mistakes throw here rather than on the first frame.

      Parameters

      Returns { graph: RenderGraph; handles: DefaultGraph3DHandles }

      The compiled graph and the DefaultGraph3DHandles its passes share.

      new View3D({
      graph: (renderer, options) => {
      const { graph, handles } = createDefaultGraph3D(renderer, options);
      graph.addPass(new MyHeatHazePass({ renderer, opaqueColorHandle: handles.opaqueColor }));
      return graph;
      },
      });

      If a pass that isn't a PostEffect claims the 'beforeToneMapping' or 'afterToneMapping' stage.

      If a 'beforeToneMapping' effect is enabled on WebGL 2 without EXT_color_buffer_float, which the float scene needs.