mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Eye normals weren't being normalised when lighting was disabled
This commit is contained in:
parent
de92555eee
commit
f9b4dad6f9
@ -1015,12 +1015,12 @@ synthesize_shader(const RenderState *rs) {
|
||||
text << "\t l_eye_normal.xyz *= tsnormal.z;\n";
|
||||
text << "\t l_eye_normal.xyz += l_tangent * tsnormal.x;\n";
|
||||
text << "\t l_eye_normal.xyz += l_binormal * tsnormal.y;\n";
|
||||
text << "\t l_eye_normal.xyz = normalize(l_eye_normal.xyz);\n";
|
||||
} else {
|
||||
text << "\t // Correct the surface normal for interpolation effects\n";
|
||||
text << "\t l_eye_normal.xyz = normalize(l_eye_normal.xyz);\n";
|
||||
}
|
||||
}
|
||||
if (_need_eye_normal) {
|
||||
text << "\t // Correct the surface normal for interpolation effects\n";
|
||||
text << "\t l_eye_normal.xyz = normalize(l_eye_normal.xyz);\n";
|
||||
}
|
||||
if (_out_aux_normal) {
|
||||
text << "\t // Output the camera-space surface normal\n";
|
||||
text << "\t o_aux.rgb = (l_eye_normal.xyz*0.5) + float3(0.5,0.5,0.5);\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user