Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/nodes/display/BumpMapNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -110,8 +111,8 @@ export default BumpMapNode;
*
* @tsl
* @function
* @param {Node<float>} textureNode - Represents the bump map data.
* @param {?Node<float>} [scaleNode=null] - Controls the intensity of the bump effect.
* @param {Node<vec3>} node - Represents the bump map data.
* @param {?Node<float>} [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 ) );
Loading