processing / processing/p5.js

Uniform Buffer Objects in webGL2?

Open
#6,439 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGL Discussion
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Topic

I was doing some logging in the setUniform function and noticing how many uniforms we're setting, even when just drawing a single object with nothing but flat lighting. Would it improve our perf at all if we switched to using uniform buffer objects instead of setting each uniform one by one for the fill / stroke / material shaders?

This might introduce more complexity than its worth, but I thought it would be good to flag nonetheless!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the setUniform entry point and trace how uniforms are sent to the fill, stroke, and material shaders. Compare the current per-uniform approach with WebGL2 uniform buffer objects, focusing on the single-object flat-lighting case described here. Done means establishing whether UBOs improve performance enough to justify the added complexity and documenting the resulting scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.