Skip to content

Shader mount optimizations - #294

Merged
uuuulala merged 5 commits into
mainfrom
shader-mount-optimisations
Oct 20, 2026
Merged

uuuulala merged 5 commits into
mainfrom
shader-mount-optimisations

Conversation

@uuuulala

@uuuulala uuuulala commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Note

Low Risk
Rendering-path optimizations with conservative WebGL defaults; behavior change is mainly skipping duplicate renders while animating.

Overview
Shader mount trims WebGL overhead and avoids redundant frames when animations are already running.

WebGL2 context creation now defaults antialias, depth, and stencil to false, with caller webGlContextAttributes still able to override. The shader program is bound once in initProgram via useProgram, so render and setUniformValues no longer re-bind on every update.

setFrame and setUniforms call a new renderUnlessAnimating helper that only triggers an immediate render when the rAF loop is idle (rafId === null), so uniform/frame tweaks during animation don’t stack an extra draw on top of the ongoing loop.

Reviewed by Cursor Bugbot for commit 9a618db. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shaders-docs Ready Ready Preview Oct 19, 2026 1:07pm UTC

Request Review

@uuuulala
uuuulala merged commit 2259e4c into main Oct 20, 2026
4 checks passed
@uuuulala
uuuulala deleted the shader-mount-optimisations branch October 20, 2026 06:50

This branch was successfully deployed

1 active deployment
Preview — 9a618dbe Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants