summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Mathews <supagu@gmail.com>2017-06-17 10:47:25 +0930
committerFabian Mathews <supagu@gmail.com>2017-06-17 10:47:25 +0930
commitff0ac9d916b7d2145a3bb000b3cf2be38c3937bc (patch)
treeab0902a001ba6afa026ca51204df57e3f4b799a3
parent29d0a21011a0ee066a40f8416bc0c9ebb9644c0f (diff)
Fixed decompression of vertex colors
-rw-r--r--servers/visual_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 127c744fad..c71ef07be9 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1294,7 +1294,7 @@ 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]];
- w[j] = Color(float(v[0] / 255.0) * 2.0 - 1.0, float(v[1] / 255.0) * 2.0 - 1.0, float(v[2] / 255.0) * 2.0 - 1.0, float(v[3] / 255.0) * 2.0 - 1.0);
+ w[j] = Color(float(v[0] / 255.0), float(v[1] / 255.0), float(v[2] / 255.0), float(v[3] / 255.0));
}
} else {
PoolVector<Color>::Write w = arr.write();