A shader hook block that modifies how color components are combined in the fragment shader. This hook can be used inside buildMaterialShader() and similar shader modify() calls to control the final color output of a material. Modifications happen between the .begin() and .end() methods of the hook.
combineColors has the following properties:
baseColor: a three-component vector representing the base color (red, green, blue).diffuse: a single number representing the diffuse reflection.ambientColor: a three-component vector representing the ambient color.ambient: a single number representing the ambient reflection.specularColor: a three-component vector representing the specular color.specular: a single number representing the specular reflection.emissive: a three-component vector representing the emissive color.opacity: a single number representing the opacity.
Call .set() on the hook with a vector with four components (red, green, blue, alpha) for the final color.
This hook is available in:
Ejemplos
Referencias Relacionadas
baseColorShader
Returns the default shader used for fills when no lights or textures are activate.
baseFilterShader
Returns the base shader used for filters.
baseMaterialShader
Returns the default shader used for fills when lights or textures are used.
baseNormalShader
Returns the default shader used for fills when normalMaterial() is activated.