summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-19 11:22:59 +0200
committerGitHub <noreply@github.com>2019-07-19 11:22:59 +0200
commitb79303d39a0ec9eea5fb4c267a8db313b52b57a2 (patch)
tree06a22f1bfd8aeed84628c08202dcd43589831ee7 /scene/resources
parent617bbdb174c07aff75db54a0b5a56f599f90b8da (diff)
parentbdffdd7e38354c66f0ec34db56bd249854949e70 (diff)
Merge pull request #30683 from bojidar-bg/30671-triplanar-binormal
Fix binormal sign when using triplanar mapping
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/material.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 197ff14b38..5372a69079 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -691,9 +691,9 @@ void SpatialMaterial::_update_shader() {
code += "\tTANGENT+= vec3(1.0,0.0,0.0) * abs(NORMAL.z);\n";
code += "\tTANGENT = normalize(TANGENT);\n";
- code += "\tBINORMAL = vec3(0.0,1.0,0.0) * abs(NORMAL.x);\n";
- code += "\tBINORMAL+= vec3(0.0,0.0,-1.0) * abs(NORMAL.y);\n";
- code += "\tBINORMAL+= vec3(0.0,1.0,0.0) * abs(NORMAL.z);\n";
+ code += "\tBINORMAL = vec3(0.0,-1.0,0.0) * abs(NORMAL.x);\n";
+ code += "\tBINORMAL+= vec3(0.0,0.0,1.0) * abs(NORMAL.y);\n";
+ code += "\tBINORMAL+= vec3(0.0,-1.0,0.0) * abs(NORMAL.z);\n";
code += "\tBINORMAL = normalize(BINORMAL);\n";
}