Skip to content

Use a dedicated SDF render-op flag instead of overloading isCoreNode#791

Merged
jfboeve merged 2 commits into
feat/removed-sdfrenderopfrom
copilot/sub-pr-790
May 11, 2026
Merged

Use a dedicated SDF render-op flag instead of overloading isCoreNode#791
jfboeve merged 2 commits into
feat/removed-sdfrenderopfrom
copilot/sub-pr-790

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

CoreTextNode was taking the SDF-specific branch by overriding isCoreNode, which also changed earlier RTT framebuffer selection in bindRenderOp. That coupling could produce incorrect u_resolution / u_pixelRatio for SDF text rendered under an RTT parent.

  • What changed

    • Added a dedicated isSdfRenderOp signal on render ops.
    • Switched SDF-specific bind logic in WebGlShaderProgram to use isSdfRenderOp instead of isCoreNode.
    • Restored CoreTextNode to the normal core-node framebuffer path so RTT parent dimensions continue to be used for resolution selection.
  • Behavioral impact

    • SDF text keeps its custom shader binding path.
    • RTT resolution/pixel ratio selection continues to follow core-node semantics for text nodes.
    • Render-op reuse remains stable for SDF text under RTT parents.
  • Regression coverage

    • Added focused WebGL tests for:
      • SDF text using parent RTT framebuffer dimensions during uniform binding
      • SDF render-op reuse when parent RTT dimensions match
  • Illustrative change

    // before
    if (isCoreNode === false && (renderOp as CoreTextNode).sdfShaderProps !== null) {
      // SDF bind
    }
    
    // after
    if (renderOp.isSdfRenderOp === true) {
      // SDF bind
    }

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] [WIP] Address feedback on removing sdfRenderOp and object creation reduction Use a dedicated SDF render-op flag instead of overloading isCoreNode May 11, 2026
Copilot AI requested a review from jfboeve May 11, 2026 12:27
@jfboeve jfboeve marked this pull request as ready for review May 11, 2026 12:37
@jfboeve jfboeve merged commit d080d14 into feat/removed-sdfrenderop May 11, 2026
1 check was pending
@jfboeve jfboeve deleted the copilot/sub-pr-790 branch May 11, 2026 12:37
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.

3 participants