Skip to content

Commit 2381d22

Browse files
authored
Docs: Improve displacementMap JSDoc. (#33453)
1 parent 7499850 commit 2381d22

6 files changed

Lines changed: 18 additions & 6 deletions

File tree

src/materials/MeshLambertMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ class MeshLambertMaterial extends Material {
181181
* displaced vertices can cast shadows, block other objects, and otherwise
182182
* act as real geometry. The displacement texture is an image where the value
183183
* of each pixel (white being the highest) is mapped against, and
184-
* repositions, the vertices of the mesh.
184+
* repositions, the vertices of the mesh. For best results, pair a
185+
* displacement map with a matching normal map, since the renderer can
186+
* not recompute surface normals from the displaced vertices.
185187
*
186188
* @type {?Texture}
187189
* @default null

src/materials/MeshMatcapMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ class MeshMatcapMaterial extends Material {
123123
* displaced vertices can cast shadows, block other objects, and otherwise
124124
* act as real geometry. The displacement texture is an image where the value
125125
* of each pixel (white being the highest) is mapped against, and
126-
* repositions, the vertices of the mesh.
126+
* repositions, the vertices of the mesh. For best results, pair a
127+
* displacement map with a matching normal map, since the renderer can
128+
* not recompute surface normals from the displaced vertices.
127129
*
128130
* @type {?Texture}
129131
* @default null

src/materials/MeshNormalMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ class MeshNormalMaterial extends Material {
8888
* displaced vertices can cast shadows, block other objects, and otherwise
8989
* act as real geometry. The displacement texture is an image where the value
9090
* of each pixel (white being the highest) is mapped against, and
91-
* repositions, the vertices of the mesh.
91+
* repositions, the vertices of the mesh. For best results, pair a
92+
* displacement map with a matching normal map, since the renderer can
93+
* not recompute surface normals from the displaced vertices.
9294
*
9395
* @type {?Texture}
9496
* @default null

src/materials/MeshPhongMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ class MeshPhongMaterial extends Material {
196196
* displaced vertices can cast shadows, block other objects, and otherwise
197197
* act as real geometry. The displacement texture is an image where the value
198198
* of each pixel (white being the highest) is mapped against, and
199-
* repositions, the vertices of the mesh.
199+
* repositions, the vertices of the mesh. For best results, pair a
200+
* displacement map with a matching normal map, since the renderer can
201+
* not recompute surface normals from the displaced vertices.
200202
*
201203
* @type {?Texture}
202204
* @default null

src/materials/MeshStandardMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ class MeshStandardMaterial extends Material {
221221
* displaced vertices can cast shadows, block other objects, and otherwise
222222
* act as real geometry. The displacement texture is an image where the value
223223
* of each pixel (white being the highest) is mapped against, and
224-
* repositions, the vertices of the mesh.
224+
* repositions, the vertices of the mesh. For best results, pair a
225+
* displacement map with a matching normal map, since the renderer can
226+
* not recompute surface normals from the displaced vertices.
225227
*
226228
* @type {?Texture}
227229
* @default null

src/materials/MeshToonMaterial.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ class MeshToonMaterial extends Material {
181181
* displaced vertices can cast shadows, block other objects, and otherwise
182182
* act as real geometry. The displacement texture is an image where the value
183183
* of each pixel (white being the highest) is mapped against, and
184-
* repositions, the vertices of the mesh.
184+
* repositions, the vertices of the mesh. For best results, pair a
185+
* displacement map with a matching normal map, since the renderer can
186+
* not recompute surface normals from the displaced vertices.
185187
*
186188
* @type {?Texture}
187189
* @default null

0 commit comments

Comments
 (0)