Merge pull request #75632 from Calinou/test-texture-fix-creation

Fix `get_test_texture()` returning an almost fully white texture
This commit is contained in:
Rémi Verschelde 2023-04-11 19:40:19 +02:00
commit 7b078bfe14
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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));
}
}
}