Fix flipped binormal in SpatialMaterial triplanar mapping
This made normal maps on triplanar materials use an inverted Y direction compared to non-triplanar materials.
This commit is contained in:
parent
3a8bea3ae3
commit
11033be5c6
1 changed files with 3 additions and 3 deletions
|
@ -702,9 +702,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