Sets an image that controls how tight a shape's highlights are.
A shininess map varies the value set by shininess() across a surface. Only the map's red channel is read, and it scales the base shininess, so bright areas get a small, sharp highlight and dark areas get a broad, soft one. This lets a single shape look polished in some places and dull in others.
The parameter, tex, is the image to use as the shininess map. Passing null clears it, as in shininessTexture(null). The map can also be scoped between push() and pop().
A light source and specularMaterial() are needed to see the effect. Models loaded with loadModel() apply their own shininess map from the .mtl file's map_Ns.
Note: shininessTexture() can only be used in WebGL mode.
Examples
Syntax
shininessTexture(tex)
Parameters
null to clear it.Related References
copyToContext
Copies the shader from one drawing context to another.
inspectHooks
Logs the hooks available in this shader, and their current implementation.
modify
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
setUniform
Sets the shader’s uniform (global) variables.