Shader minification
@karimnaaji is already working on this.
Since Jun 11, 2020.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Changes to the shaders seems to be rather impactful on the library size. To minimize that we can try to make use of https://www.npmjs.com/package/glsl-minifier which also benefits from a forked version of https://github.com/aras-p/glsl-optimizer.
glsl-optimizer has a few advantages such as dead code removal, algebraic simplifications (increase of instruction merging), constant propagation, constant folding and inlining or loop unfolding.
If we manage to introduce both of these we would most likely benefit from both library size reduction and potential run-time GPU optimization.
We would have to find a way to flag our shader injection symbols to not be optimized, as we have shader code variants based on data driven styling.
cc @arindam1993
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.