Fix instance mode usage of uniformFloat() in shader.modify() example by aashu2006 · Pull Request #8470 · processing/p5.js

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@aashu2006

Copy link

Resolves #8467

Changes

  • Fixed the instance mode example for p5.shader.modify() in the reference.
  • Updated the example to use sketch.uniformFloat('b') instead of calling uniformFloat() as a global function.
  • This aligns the example with correct instance mode usage, where all p5 APIs must be accessed via the sketch instance.

The issue occurred because the example already uses sketch.createCanvas() and sketch.background(), but missed prefixing uniformFloat() with sketch, causing a runtime error in instance mode.

PR Checklist

  • npm run lint passes
  • [Inline reference] is included / updated
  • [Unit tests] are included / updated (not applicable for documentation change)
Copy link

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 the fix!

aashu2006 reacted with heart emoji

@davepagurek davepagurek merged commit 4fc91bf into processing:dev-2.0

Feb 7, 2026

2 checks passed

@ksen0 ksen0 added this to the 2.3 milestone

Feb 11, 2026

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

Reviewers

@davepagurek davepagurek davepagurek approved these changes

Assignees

No one assigned

Labels

None yet

Projects

Status: Completed

Milestone

2.3

Development

Successfully merging this pull request may close these issues.

3 participants

@aashu2006 @davepagurek @ksen0