Capítulo 439 de 859

Chapter 439: NormalMapNode

Core Idea

This class can be used for applying normals maps to materials.

Key Concepts

  • node : Node.<vec3>: Represents the normal map data.
  • normalMapType : TangentSpaceNormalMap | ObjectSpaceNormalMap: The normal map type.
  • scaleNode : Node.<vec2>: Controls the intensity of the effect.
  • unpackNormalMode : string: Controls how to unpack the sampled normal map values.

Code Examples

material.normalNode = normalMap( texture( normalTex ) );
  • What it demonstrates: Typical usage of NormalMapNode.

Reference Tables

Constructor

Signature
new NormalMapNode( node : Node.<vec3>, scaleNode : Node.<vec2> )

Properties

PropertyDescription
.node : Node.<vec3>Represents the normal map data.
`.normalMapType : TangentSpaceNormalMapObjectSpaceNormalMap`
.scaleNode : Node.<vec2>Controls the intensity of the effect.
.unpackNormalMode : stringControls how to unpack the sampled normal map values.

Key Takeaways

  1. NormalMapNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: node, normalMapType, scaleNode, unpackNormalMode.

Connects To