|
|
@@ -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.
|
|
|
*
|