function getStructAssignments(fieldNames, values, struct, type) {
  function constructAssignment(field) {
    const value = values[field.specName];
    if (defined(value)) {
      return `${struct}.${field.shaderName} = ${type}(${value});`;
    }
  }
  return defined(values)
    ? fieldNames.map(constructAssignment).filter(defined)
    : [];
}
Construct GLSL assignment statements to set metadata spec values in a struct
@param {Object[]} fieldNames An object with the following properties:
@param {string} fieldNames[].specName The name of the property in the spec
@param {string} fieldNames[].shaderName The name of the property in the shader
@param {object} values A source of property values, keyed on fieldNames[].specName
@param {string} struct The name of the struct to which values will be assigned
@param {string} type The type of the values to be assigned
@returns {Array<{name: string, value: any}>} Objects containing the property name (in the shader) and a GLSL assignment statement for the property value
@private