Creates and loads a filter shader from an external file.
Ejemplos
Sintaxis
loadFilterShader(fragFilename, [successCallback], [failureCallback])
Parámetros
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.
Returns
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!
Referencias Relacionadas
copyToContext
Copia el shader de un contexto de dibujo a otro.
setUniform
Establece los valores de las variables uniformes (globales) del shader.
ambientMaterial
Establece el color ambiental del material de la superficie de las formas.
createFilterShader
Crea un objeto p5.Shader para ser utilizado con la función filter().