diff options
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 { |