generateTexture( texture, textureProperty, uvSnippet, depthSnippet ) {

		if ( texture.isDepthTexture ) {

			if ( depthSnippet ) uvSnippet = `vec4( ${ uvSnippet }, ${ depthSnippet } )`;

			return `texture( ${ textureProperty }, ${ uvSnippet } ).x`;

		} else {

			if ( depthSnippet ) uvSnippet = `vec3( ${ uvSnippet }, ${ depthSnippet } )`;

			return `texture( ${ textureProperty }, ${ uvSnippet } )`;

		}

	}
Generates the GLSL snippet for sampling/loading the given texture.

@param {Texture} texture - The texture.
@param {string} textureProperty - The name of the texture uniform in the shader.
@param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling.
@param {?string} depthSnippet -  A GLSL snippet that represents the 0-based texture array index to sample.
@return {string} The GLSL snippet.