mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
Fix a bug with tangents and binormals
This commit is contained in:
parent
3070f18c24
commit
2ae458c2df
@ -802,8 +802,8 @@ synthesize_shader(const RenderState *rs) {
|
||||
}
|
||||
if (_map_index_height >= 0) {
|
||||
text << "\t float3 eyedir = mspos_view.xyz - vtx_position.xyz;\n";
|
||||
text << "\t l_eyevec.x = dot(vtx_tangent" << _map_index_height << ".xyz, eyedir);\n";
|
||||
text << "\t l_eyevec.y = dot(vtx_binormal" << _map_index_height << ".xyz, eyedir);\n";
|
||||
text << "\t l_eyevec.x = dot(vtx_" << tangent_input << ".xyz, eyedir);\n";
|
||||
text << "\t l_eyevec.y = dot(vtx_" << binormal_input << ".xyz, eyedir);\n";
|
||||
text << "\t l_eyevec.z = dot(vtx_normal.xyz, eyedir);\n";
|
||||
text << "\t l_eyevec = normalize(l_eyevec);\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user