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

Add support for Texture Buffer Objects (TBOs) #7344

Open
1 of 17 tasks
RandomGamingDev opened this issue Oct 31, 2024 · 1 comment
Open
1 of 17 tasks

Add support for Texture Buffer Objects (TBOs) #7344

RandomGamingDev opened this issue Oct 31, 2024 · 1 comment

Comments

@RandomGamingDev
Copy link
Contributor

Increasing access

This would allow for more complex shaders which require more data while still making it possible to run them in realistic amounts of time. It would also help to introduce p5.js users to GPU based computing, which would be a great step forward for helping to develop the WebGL knowledge of beginners. For instance, high resolution voxel terrain which could use the increased amount of data transferring that TBOs allow for.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

Create an official function that acts similarly to setUniform(), but offers more control over TBO specifics (e.g. texture type).

Similar to #7309

@Vaivaswat2244
Copy link

Hey I'm interested in working on this. The idea of adding more control over texture buffer objects seems really useful, especially for projects that need to handle larger datasets in shaders.
I've been looking at how we could extend the current setUniform() functionality to give users more control over texture types and formats.
Would love to help implement this - has anyone already started working on it?
@davepagurek can you please guide on this
I was thinking about an implementation with

gl.texBuffer(gl.TEXTURE_BUFFER, options.format, buffer);
const location = gl.getUniformLocation(program, name);
gl.uniform1i(location, options.textureUnit);  
    

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

No branches or pull requests

2 participants