Change text vertex order of text to be consistent with regular rendering for backface culling
@davepagurek is already working on this.
Since Mar 15, 2025.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Increasing access
When rendering rectangles, the backface can be culled by doing
drawingContext.enable(drawingContext.CULL_FACE);
drawingContext.cullFace(drawingContext.FRONT);
This is true for rectangless, planes, cubes, and most objects in general.
However, the one exception I've found is text.
With this having practically no other effect and most programs not getting broken by this change (those complex enough to use those features and get affected would likely use a specific version of p5.js whether via cdn or local package anyways) I believe it's worth it to make the change for programs that can use the performance.
While it'd be preferable for
drawingContext.cullFace(drawingContext.BACK);
to work the way most people using WebGL would use it, I don't believe that would be the best route given that there are likely some programs that already rely on this.
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 enhancement details
Change the order of the vertices so that they're going in the other direction rotationally from any perspective.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.