Parallelise shader compilation and programs linking
Opened this issue · 0 comments
w0rm commented
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 recommend that the shader compilation and program linking should be run in parallel.
This would probably require the following steps:
- Loop through all the entities and initiate the shader compilation and figure out all the programs that need to be linked
- Loop through the programs to start linking these
- Loop through the programs again to check the linking status
- Loop through all the entities to draw them