Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending number arrays as shader uniform doesn't behave properly #5481

Closed
2 of 17 tasks
somecho opened this issue Nov 27, 2021 · 1 comment · Fixed by #5483
Closed
2 of 17 tasks

Sending number arrays as shader uniform doesn't behave properly #5481

somecho opened this issue Nov 27, 2021 · 1 comment · Fixed by #5483

Comments

@somecho
Copy link

somecho commented Nov 27, 2021

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Details about the bug:

Description:

  • Sending an array of numbers as a uniform to shader works but updating the array later in p5, the data doesn't seem to be sent to the shader.
@somecho somecho added the Bug label Nov 27, 2021
@welcome
Copy link

welcome bot commented Nov 27, 2021

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

aferriss pushed a commit to aferriss/p5.js that referenced this issue Nov 27, 2021
Arrays were not being properly detected based on uniform type information.

Once fixing this, I also had to detect if arrays were being passed to `setUniform` and make a shallow copy there to make sure we update cached uniforms correctly.
stalgiag added a commit that referenced this issue Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants