Skip to content

implementing random function for strands#8730

Merged
davepagurek merged 7 commits into
processing:dev-2.0from
perminder-17:random-strands
May 3, 2026
Merged

implementing random function for strands#8730
davepagurek merged 7 commits into
processing:dev-2.0from
perminder-17:random-strands

Conversation

@perminder-17
Copy link
Copy Markdown
Collaborator

@perminder-17 perminder-17 commented Apr 18, 2026

No description provided.

@ksen0 ksen0 added this to the 2.3 milestone Apr 19, 2026
@ksen0 ksen0 moved this to In Progress in p5.js 2.x 🌱🌳 Apr 19, 2026
@perminder-17 perminder-17 marked this pull request as ready for review April 25, 2026 22:10
@perminder-17
Copy link
Copy Markdown
Collaborator Author

Hi @davepagurek and @ksen0 , sorry for the delay, its open for the review, Can you please check once?

Copy link
Copy Markdown
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on, the structure is looking good! I left one thing about possibly making the call index a runtime thing instead of compile time to better support for loops, and maybe we could add a test case for vertex + fragment shaders too?

Comment thread src/strands/strands_api.js Outdated
if (shaderType === 'vertex') {
if (!main.match(/\@builtin\s*\(\s*instance_index\s*\)/)) {
main = main.replace(/\)\s*(->|\{)/, ', @builtin(instance_index) instanceID: u32) $1');
const ensuredInstance = ensureBuiltinParam(main, 'instance_index', 'instanceID', 'u32');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work generalizing this!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow yes, nice!

Copy link
Copy Markdown
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks good! Great work @perminder-17!

@davepagurek davepagurek merged commit 5a7a0a8 into processing:dev-2.0 May 3, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Completed in p5.js 2.x 🌱🌳 May 3, 2026
@perminder-17 perminder-17 deleted the random-strands branch May 3, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants