Document transparency, blend state and dual-source blending - #1097
Open
mvaligursky wants to merge 5 commits into
Open
Document transparency, blend state and dual-source blending#1097mvaligursky wants to merge 5 commits into
mvaligursky wants to merge 5 commits into
Conversation
mvaligursky
force-pushed
the
codex/document-dual-source-blending
branch
from
August 21, 2026 11:15
93ad2bd to
51a2223
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Do not merge this PR until PlayCanvas Engine 2.22 is released.
Overview
Documents transparency in the graphics user manual, and the dual-source blending support
introduced by playcanvas/engine#9096.
Rebased onto
main(it was 50 commits behind, and pinned an older engine). Now also carries theTransparency page previously proposed in #1157, so that the two pages can cross-link - they cover
the same subject from different levels, and neither could link to the other while they were
separate branches.
Changes
Transparency page (user manual)
Transparencypage underuser-manual/graphics, placed after Physically Based Rendering,covering alpha blending, alpha test, opacity dithering and alpha to coverage. Each notes whether
it is order dependent, which pass it renders in, and its main drawback, with a summary table and
a short "which one should I use" guide. The manual previously had no conceptual coverage of
transparency at all.
Material#blendStatefor full control over the blend equation, per-channel factorsand write mask, the ready-made
BlendStateconstants, and that the getter is a read-only viewso the setter must be used to keep transparency and sort state in sync.
BlendState#setAttachment(indices 1 to 7, withunassigned attachments following attachment 0), gated on
GraphicsDevice#supportsIndependentBlending.ignored otherwise, plus the WebGPU-only requirement that the first color attachment use a
blendable format with an alpha channel - which
CameraFramedoes not satisfy by default, asPIXELFORMAT_111110Fhas no alpha. Notes that WebGL has no such restriction, so this is adeliberate difference between the backends rather than a bug.
Dual-source blending (advanced rendering)
dual-source-blendingand WebGL 2WEBGL_blend_func_extendedsupport.Cross-linking
back to Transparency for how blend state relates to the other transparency options.
Matching Japanese documentation is included for every changed and added page.
Validation
npm run buildsucceeds for both locales (buildandbuild/ja), which confirms the newcross-links resolve.