specular VEX function

phong, blinn, and specular return the illumination for specular highlights using different lighting models.

Context: surface

See also: matchvex_specular, phong, Writing a PBR shader

  1. vector specular(vector nml, vector V, float roughness)

  2. bsdf specular(vector dir)

See phong for information on the basic lighting models. See writing a PBR shader for information on BSDFs.

You can optionally specify a light mask.

BSDF version

  1. bsdf specular(vector dir)

A mirror specular reflection along a given direction vector.

  • dir – the direction of specularity.