Merge branch 'release/1.9.x'

This commit is contained in:
rdb 2015-06-15 00:20:17 +02:00
commit 5d364d6128
1 changed files with 4 additions and 2 deletions

View File

@ -724,6 +724,8 @@ synthesize_shader(const RenderState *rs) {
text << "\t uniform float4x4 trans_model_to_view,\n";
eye_position_freg = alloc_freg();
text << "\t out float4 l_eye_position : " << eye_position_freg << ",\n";
} else if ((_lighting || _out_aux_normal) && (_map_index_normal >= 0 && _auto_normal_on)) {
text << "\t uniform float4x4 trans_model_to_view,\n";
}
if (_need_eye_normal) {
eye_normal_freg = alloc_freg();
@ -799,9 +801,9 @@ synthesize_shader(const RenderState *rs) {
text << "\t l_color = vtx_color;\n";
}
if ((_lighting || _out_aux_normal) && (_map_index_normal >= 0 && _auto_normal_on)) {
text << "\t l_tangent.xyz = mul((float3x3)tpose_view_to_model, vtx_" << tangent_input << ".xyz);\n";
text << "\t l_tangent.xyz = normalize(mul((float3x3)trans_model_to_view, vtx_" << tangent_input << ".xyz));\n";
text << "\t l_tangent.w = 0;\n";
text << "\t l_binormal.xyz = mul((float3x3)tpose_view_to_model, -vtx_" << binormal_input << ".xyz);\n";
text << "\t l_binormal.xyz = normalize(mul((float3x3)trans_model_to_view, -vtx_" << binormal_input << ".xyz));\n";
text << "\t l_binormal.w = 0;\n";
}
if (_shadows && _auto_shadow_on) {