-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Displacement Map: displace after morphing/skinning
- Loading branch information
jaxry
committed
May 6, 2017
1 parent
68d46fc
commit 572bd54
Showing
7 changed files
with
5 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,3 @@ vec3 transformedNormal = normalMatrix * objectNormal; | |
transformedNormal = - transformedNormal; | ||
|
||
#endif | ||
|
||
|
11 changes: 1 addition & 10 deletions
11
src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
#ifdef USE_DISPLACEMENTMAP | ||
|
||
#ifdef USE_MORPHNORMALS | ||
|
||
transformed += morphNormal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias ); | ||
|
||
#else | ||
|
||
transformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias ); | ||
|
||
#endif | ||
|
||
transformed += normalize(objectNormal) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias ); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters