Skip to content

Commit 8df553e

Browse files
authored
WGSLNodeBuilder: Remove obsolete overwrite. (#31423)
* WGSLNodeBuilder: Remove obsolete overwrite. * Clean up.
1 parent 8cd0179 commit 8df553e

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/renderers/webgpu/nodes/WGSLNodeBuilder.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { NodeAccess } from '../../../nodes/core/constants.js';
1616
import VarNode from '../../../nodes/core/VarNode.js';
1717
import ExpressionNode from '../../../nodes/code/ExpressionNode.js';
1818

19-
import { NoColorSpace, FloatType, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter, SRGBColorSpace } from '../../../constants.js';
19+
import { FloatType, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter } from '../../../constants.js';
2020

2121
// GPUShaderStage is not defined in browsers not supporting WebGPU
2222
const GPUShaderStage = ( typeof self !== 'undefined' ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
@@ -211,25 +211,6 @@ class WGSLNodeBuilder extends NodeBuilder {
211211

212212
}
213213

214-
/**
215-
* Checks if the given texture requires a manual conversion to the working color space.
216-
*
217-
* @param {Texture} texture - The texture to check.
218-
* @return {boolean} Whether the given texture requires a conversion to working color space or not.
219-
*/
220-
needsToWorkingColorSpace( texture ) {
221-
222-
if ( texture.isVideoTexture && texture.colorSpace === SRGBColorSpace ) {
223-
224-
// Video textures are always in sRGB color space, so no conversion is needed
225-
return false;
226-
227-
}
228-
229-
return texture.colorSpace !== NoColorSpace;
230-
231-
}
232-
233214
/**
234215
* Generates the WGSL snippet for sampled textures.
235216
*

0 commit comments

Comments
 (0)