Просмотр исходного кода

WGSLNodeBuilder: Remove obsolete overwrite. (#31423)

* WGSLNodeBuilder: Remove obsolete overwrite.

* Clean up.
Michael Herzog 10 месяцев назад
Родитель
Сommit
8df553ef44
1 измененных файлов с 1 добавлено и 20 удалено
  1. 1 20
      src/renderers/webgpu/nodes/WGSLNodeBuilder.js

+ 1 - 20
src/renderers/webgpu/nodes/WGSLNodeBuilder.js

@@ -16,7 +16,7 @@ import { NodeAccess } from '../../../nodes/core/constants.js';
 import VarNode from '../../../nodes/core/VarNode.js';
 import ExpressionNode from '../../../nodes/code/ExpressionNode.js';
 
-import { NoColorSpace, FloatType, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter, SRGBColorSpace } from '../../../constants.js';
+import { FloatType, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter } from '../../../constants.js';
 
 // GPUShaderStage is not defined in browsers not supporting WebGPU
 const GPUShaderStage = ( typeof self !== 'undefined' ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
@@ -211,25 +211,6 @@ class WGSLNodeBuilder extends NodeBuilder {
 
 	}
 
-	/**
-	 * Checks if the given texture requires a manual conversion to the working color space.
-	 *
-	 * @param {Texture} texture - The texture to check.
-	 * @return {boolean} Whether the given texture requires a conversion to working color space or not.
-	 */
-	needsToWorkingColorSpace( texture ) {
-
-		if ( texture.isVideoTexture && texture.colorSpace === SRGBColorSpace ) {
-
-			// Video textures are always in sRGB color space, so no conversion is needed
-			return false;
-
-		}
-
-		return texture.colorSpace !== NoColorSpace;
-
-	}
-
 	/**
 	 * Generates the WGSL snippet for sampled textures.
 	 *

粤ICP备19079148号