Merge pull request #49949 from Calinou/standardmaterial3d-fix-triplanar-binormal
Fix flipped binormal in StandardMaterial3D triplanar mapping
This commit is contained in:
commit
20ca6c159a
|
@ -822,9 +822,9 @@ void BaseMaterial3D::_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 New Issue