Skip to content

Support strands shader variable names including double underscores#8923

Open
eupthere wants to merge 2 commits into
processing:mainfrom
eupthere:uniform-double-underscore
Open

Support strands shader variable names including double underscores#8923
eupthere wants to merge 2 commits into
processing:mainfrom
eupthere:uniform-double-underscore

Conversation

@eupthere

@eupthere eupthere commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Resolves #8875
Resolves #8794

Changes:

  • Explicitly initialize strandsContext and add JSDoc comments for fields overview.
  • Support strands variable name including double underscores for uniform / varying / shared.
  • Introduce internal strands variable namespace _p5_strands_*.
  • Store shaderNameMap, shaderNameState in strandsContext and shader hooks.
  • Restore internal shader names like _p5_strands_0 back to the original user-facing names like __val in WebGL shader compile errors, to make debugging easier.
  • Add unit test for changed code

Tests Passed:

  • npm test -- test/unit/webgl/p5.Shader.js
  • npm test -- test/unit/webgpu/p5.Shader.js

PR Checklist

  • npm run lint passes
  • Inline reference is included / updated
  • Unit tests are included / updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant