pyshader icon indicating copy to clipboard operation
pyshader copied to clipboard

Allow creating modules with multiple entry points?

Open almarklein opened this issue 5 years ago • 2 comments

Or ... maybe not. GLSL modules have one entry point, so we'd exclude compiling to GLSL. At the least wait until we know if WSL supports this too.

Pro's:

  • Better code-reused at the GPU, so a tiny GPU memory consumption benefit?
  • Might be nice if it can be used to pack a vertex and fragment shader into a single module. But not sure if it can?
  • ...

almarklein avatar Jan 06 '20 13:01 almarklein

Why?

Korijn avatar Jan 06 '20 14:01 Korijn

SpirV and WSL support it. But yeah, maybe this is mainly to allow writing multiple shaders in a single file. We already allow that (e.g. using the decorator multiple times on a function). So it could well be that there is no benefit.

Edit: That's why the title of this issues ends with a question mark :)

almarklein avatar Jan 06 '20 15:01 almarklein