generateTextureCompare( texture, textureProperty, uvSnippet, compareSnippet, depthSnippet, shaderStage = this.shaderStage ) {

		if ( shaderStage === 'fragment' ) {

			if ( texture.isDepthTexture === true && texture.isArrayTexture === true ) {

				return `textureSampleCompare( ${ textureProperty }, ${ textureProperty }_sampler, ${ uvSnippet }, ${ depthSnippet }, ${ compareSnippet } )`;

			}

			return `textureSampleCompare( ${ textureProperty }, ${ textureProperty }_sampler, ${ uvSnippet }, ${ compareSnippet } )`;

		} else {

			console.error( `WebGPURenderer: THREE.DepthTexture.compareFunction() does not support ${ shaderStage } shader.` );

		}

	}
Generates the WGSL snippet for sampling a depth texture and comparing the sampled depth values
against a reference value.

@param {Texture} texture - The texture.
@param {string} textureProperty - The name of the texture uniform in the shader.
@param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling.
@param {string} compareSnippet -  A WGSL snippet that represents the reference value.
@param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample.
@param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for.
@return {string} The WGSL snippet.