elm-explorations / elm-explorations/webgl

Parallelise shader compilation and programs linking

Open
#33 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Elm
Stars
123
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The first frame may take a while to render because the WebGL scene may be composed out of different combinations of shaders.

[WebGL best practices](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#Compile_Shaders_and_Link_Programs_in_parallel) recommend that the shader compilation and program linking should be run in parallel.

This would probably require the following steps:

1. Loop through all the entities and initiate the shader compilation and figure out all the programs that need to be linked
2. Loop through the programs to start linking these
3. Loop through the programs again to check the linking status
4. Loop through all the entities to draw them

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.