이 API는 실험적입니다
향후 p5.js 버전에서 동작이 변경될 수 있습니다.
A shader hook block that modifies the final color of each pixel after all lighting is applied. This hook can be used inside buildMaterialShader() and similar shader modify() calls to adjust the color before it appears on the screen. Modifications happen between the .begin() and .end() methods of the hook.
finalColor has the following properties:
color: a four-component vector representing the pixel color (red, green, blue, alpha).texCoord: a two-component vector representing the texture coordinates (u, v)
Call .set() on the hook with a vector with four components (red, green, blue, alpha) to update the final color.
This hook is available in:
예제
Notice any errors or typos? Please let us know. Please feel free to edit src/strands/p5.strands.js and open a pull request!