Creates and loads a filter shader from an external file.
示例
语法
loadFilterShader(fragFilename, [successCallback], [failureCallback])
参数
fragFilename
String: path to the fragment shader file
successCallback
Function: callback to be called once the shader is loaded. Will be passed the p5.Shader object.
failureCallback
Function: callback to be called if there is an error loading the shader. Will be passed the error event.
返回值
Promise<p5.Shader>: a promise that resolves with a shader object
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/material.js and open a pull request!