Javascript and WebGL, external scripts

前端 未结 4 1058
一个人的身影
一个人的身影 2020-12-13 14:26

Just curious; How do I place my webgl shaders, in an external file?

Currently I\'m having;

    

        
4条回答
  •  渐次进展
    2020-12-13 14:58

    You could use an open source shader managing library like mine:

    https://github.com/ILOVEPIE/Shader.js

    It lets you load shaders from urls and caches shader source code for future visits to the site. It also makes it simpler to use uniforms.

提交回复
热议问题