You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
fix for two incorrectly bound texture formats
This commit is contained in:
@@ -7755,6 +7755,34 @@ RasterizerStorageRD::RasterizerStorageRD() {
|
||||
}
|
||||
}
|
||||
|
||||
{ //create default cubemap white array
|
||||
|
||||
RD::TextureFormat tformat;
|
||||
tformat.format = RD::DATA_FORMAT_R8G8B8A8_UNORM;
|
||||
tformat.width = 4;
|
||||
tformat.height = 4;
|
||||
tformat.array_layers = 6;
|
||||
tformat.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT;
|
||||
tformat.type = RD::TEXTURE_TYPE_CUBE;
|
||||
|
||||
Vector<uint8_t> pv;
|
||||
pv.resize(16 * 4);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
pv.set(i * 4 + 0, 255);
|
||||
pv.set(i * 4 + 1, 255);
|
||||
pv.set(i * 4 + 2, 255);
|
||||
pv.set(i * 4 + 3, 255);
|
||||
}
|
||||
|
||||
{
|
||||
Vector<Vector<uint8_t>> vpv;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
vpv.push_back(pv);
|
||||
}
|
||||
default_rd_textures[DEFAULT_RD_TEXTURE_CUBEMAP_WHITE] = RD::get_singleton()->texture_create(tformat, RD::TextureView(), vpv);
|
||||
}
|
||||
}
|
||||
|
||||
{ //create default 3D
|
||||
|
||||
RD::TextureFormat tformat;
|
||||
|
||||
Reference in New Issue
Block a user