Merge pull request #30683 from bojidar-bg/30671-triplanar-binormal
Fix binormal sign when using triplanar mapping
This commit is contained in:
commit
b79303d39a
1 changed files with 3 additions and 3 deletions
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue