diff --git a/src/nodes/display/BumpMapNode.js b/src/nodes/display/BumpMapNode.js index 8e3ff12cfe750b..ea70e430e78e75 100644 --- a/src/nodes/display/BumpMapNode.js +++ b/src/nodes/display/BumpMapNode.js @@ -3,7 +3,8 @@ import { uv } from '../accessors/UV.js'; import { normalView } from '../accessors/Normal.js'; import { positionView } from '../accessors/Position.js'; import { faceDirection } from './FrontFacingNode.js'; -import { Fn, nodeProxy, float, vec2 } from '../tsl/TSLBase.js'; +import { convertToTexture } from '../utils/RTTNode.js'; +import { Fn, nodeObject, float, vec2 } from '../tsl/TSLBase.js'; // Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen // https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf @@ -110,8 +111,8 @@ export default BumpMapNode; * * @tsl * @function - * @param {Node} textureNode - Represents the bump map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. + * @param {Node} node - Represents the bump map data. + * @param {?Node} [scale=null] - Controls the intensity of the bump effect. * @returns {BumpMapNode} */ -export const bumpMap = /*@__PURE__*/ nodeProxy( BumpMapNode ).setParameterLength( 1, 2 ); +export const bumpMap = ( node, scale = null ) => new BumpMapNode( convertToTexture( node ), nodeObject( scale ) );