[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Support precompiled shaders as extensions



A big part of the problem of slow compile times in GL stems from the limited ways that shaders can be composed
  1. Composing a program from several shader objects attached per stage -> often triggers slow compile times at program linking time, unsupported by D3D (?)
  2. Composing a program by mixing stages -> Does not address intra-stage configuration, often triggers slow compile times at program linking time, unsupported by D3D (?)
  3. EXT_separate_shader_objects -> Does not address intra-stage configuration, unsupported by D3D (?)
  4. ARB_shader_subroutine -> Not supported by D3D (?) and ES
In order to cut down on compile times, we should have a way to compile fragments of shader programs and then quickly (re)configure them at run-time into a working program. It would allow to compile far less shader code because it avoids duplicate compilation. This capability does not presently exist. The closest we're getting to that are shader subroutines, but even that isn't quite there.