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.
예제
구문
shininessTexture(tex)
매개변수
null to clear it.관련 레퍼런스
p5.Shader
A class to describe a shader program.
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.
version
Shaders are written in GLSL, but there are different versions of GLSL that it might be written in.