summaryrefslogtreecommitdiffstats
path: root/servers/rendering_server.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2023-04-04 02:30:05 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-04-04 02:30:05 +0200
commite4d5cecd4c5e571b6f46b2a7d3e693d09277eb37 (patch)
tree6eb840e3fdb2f45afcfb08252c9994245bfd6ad4 /servers/rendering_server.cpp
parentef025711a694071a1407b5035a6fe3e67c2a5b07 (diff)
downloadredot-engine-e4d5cecd4c5e571b6f46b2a7d3e693d09277eb37.tar.gz
Fix `get_test_texture()` returning an almost fully white texture
The texture's appearance is now similar to the texture that was displayed on the TestCube node in Godot 2.x.
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r--servers/rendering_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index d88cbec13b..36bc36e011 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -140,9 +140,9 @@ RID RenderingServer::get_test_texture() {
c.b = y;
}
- w[(y * TEST_TEXTURE_SIZE + x) * 3 + 0] = uint8_t(CLAMP(c.r * 255, 0, 255));
- w[(y * TEST_TEXTURE_SIZE + x) * 3 + 1] = uint8_t(CLAMP(c.g * 255, 0, 255));
- w[(y * TEST_TEXTURE_SIZE + x) * 3 + 2] = uint8_t(CLAMP(c.b * 255, 0, 255));
+ w[(y * TEST_TEXTURE_SIZE + x) * 3 + 0] = uint8_t(CLAMP(c.r, 0, 255));
+ w[(y * TEST_TEXTURE_SIZE + x) * 3 + 1] = uint8_t(CLAMP(c.g, 0, 255));
+ w[(y * TEST_TEXTURE_SIZE + x) * 3 + 2] = uint8_t(CLAMP(c.b, 0, 255));
}
}
}