Skip to content

Add Render Targets manual page - #1102

Open
mvaligursky wants to merge 2 commits into
mainfrom
mv-render-targets-docs
Open

Add Render Targets manual page#1102
mvaligursky wants to merge 2 commits into
mainfrom
mv-render-targets-docs

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Adds a foundational Render Targets page under Advanced Rendering, filling a gap the Multiple Render Targets page previously assumed. It documents the full render-to-texture workflow and the new RenderTarget origin option for cross-API orientation.

New page (advanced-rendering/render-targets.md):

  • What a render target is; creating one; rendering a scene into it via a camera (negative priority).
  • Excluding the display surface using layers (the three-layer / two-camera pattern from the example) to avoid the feedback loop.
  • Using the result as a material map.
  • Orientation — the origin option (RENDERTARGET_ORIGIN_TOP / BOTTOM / NATIVE) and the WebGL2↔WebGPU row-order difference.
  • Choosing a renderable / HDR format (incl. GraphicsDevice.getRenderableHdrFormat).
  • Resizing, MSAA (auto-resolve), and cleanup.
  • Embeds the graphics/render-to-texture engine example.

Companion changes:

  • sidebars.js: inserts the page before Multiple Render Targets.
  • Multiple Render Targets: adds origin: pc.RENDERTARGET_ORIGIN_TOP to the render target snippet and a link to the new page.
  • Multiple Cameras: links its Render Targets section to the new page.

Important

Do not merge until engine 2.22 is released. The origin option and the RENDERTARGET_ORIGIN_* constants ship in engine 2.22; until that is the published release, the API reference links (variables/RENDERTARGET_ORIGIN_*.html) would 404 and the documented code would not run for readers.

Adds a foundational "Render Targets" page under Advanced Rendering covering
creation, rendering a scene into a target, excluding the display surface via
layers, the RenderTarget origin option for cross-API orientation, choosing a
renderable/HDR format, resizing, MSAA and cleanup, with the render-to-texture
example embedded.

Also links the new page from the Multiple Render Targets and Multiple Cameras
pages, and adds the origin option to the MRT render target snippet.
Translates the new Render Targets manual page into Japanese, and mirrors the
companion edits (origin option in the MRT snippet and cross-links) in the
Japanese Multiple Render Targets and Multiple Cameras pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant