diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-03 10:44:45 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-03 10:45:34 -0300 |
commit | e63c64e256bc77618e4ea5ab13ecba6306ced0e6 (patch) | |
tree | 5afb9164567b5d0682dab6f93d84e7261529c78a /servers | |
parent | afbb5261e660acf08dd62f698d353e95fc7fb6bb (diff) |
Clean up normalmapping, make sure tangents are imported correctly.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index eb0848ff50..c833f4eabd 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1262,9 +1262,9 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ for (int j = 0; j < p_vertex_len; j++) { - const uint8_t *v = (const uint8_t *)&r[j * total_elem_size + offsets[i]]; + const int8_t *v = (const int8_t *)&r[j * total_elem_size + offsets[i]]; for (int k = 0; k < 4; k++) { - w[j * 4 + k] = float(v[k] / 255.0) * 2.0 - 1.0; + w[j * 4 + k] = float(v[k] / 127.0); } } } else { |