What does “pars” stand for?
“Parameters”. It’s mostly declarations of
varyings, and often functions that pertain to the use of those variables.
For example, including
bumpmap_pars_fragment in your material appends this code to your GLSL fragment shader, which adds
bumpScale uniforms, as well as the 2 functions necessary to process those bumpmaps.
Is “pars” naming something unique to Three?
Only as much as any abbreviation is unique to anything else, AFAIK.
The concept of shader chunks is not unique to three.js and it is a common procedure in many renderers. But to call the parameters chunks “pars”, that’s just a preference for keeping the naming short.
Reminds me of a time when a team member gave me a hard time for using
"bgnd" instead of
"background". He argued for 15 minutes that it’s not a standard abbreviation, and even spent time looking online for examples of other people using it. Since he couldn’t find any, he decided to re-write my code.
Cool. Was just wondering. Because I know terms like “specular” and “diffuse” are conventional beyond Three.
Usually people abbreviate parameters as params.
Thanks! I just wanted to know what it stood for. “params” would’ve been more obvious but I had no idea what “pars” meant.
diffuse are names coined with physical properties in mind. Those refer to the physical interaction of light with surfaces of different micro irregularities ( roughness ).
parameters is much broader term, used in many areas. Most commonly in computer science.
As @marquizzo pointed, there’s really no rules for how you abbreviate stuff. At least, not that I know of. But I’m pretty sure the reason why “pars” is used instead of “params” is simply to make things shorter.