Get the base shader for filters.
You can then call baseFilterShader().modify() and change the following hook:
| Hook | Description |
|---|---|
| Output the final color for the current pixel. It takes in two parameters:
|
Most of the time, you will need to write your hooks in GLSL ES version 300. If you are using WebGL 1, write your hooks in GLSL ES 100 instead.
示例
语法
baseFilterShader()
参数
返回值
p5.Shader: The filter shader
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/material.js and open a pull request!