function destroyShader(cache, cachedShader) {
  const derivedKeywords = cachedShader.derivedKeywords;
  const length = derivedKeywords.length;
  for (let i = 0; i < length; ++i) {
    const keyword = derivedKeywords[i] + cachedShader.keyword;
    const derivedCachedShader = cache._shaders[keyword];
    destroyShader(cache, derivedCachedShader);
  }

  delete cache._shaders[cachedShader.keyword];
  cachedShader.shaderProgram.finalDestroy();
}
Returns a shader program from the cache, or creates and caches a new shader program,
given the GLSL vertex and fragment shader source and attribute locations.

@param {object} options Object with the following properties:
@param {string|ShaderSource} options.vertexShaderSource The GLSL source for the vertex shader.
@param {string|ShaderSource} options.fragmentShaderSource The GLSL source for the fragment shader.
@param {object} options.attributeLocations Indices for the attribute inputs to the vertex shader.

@returns {ShaderProgram} The cached or newly created shader program.