mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Remove GPU readback from NoiseTexture3D.get_format
This commit is contained in:
parent
16a93563bf
commit
60d5571d6c
@ -110,6 +110,7 @@ void NoiseTexture3D::_set_texture_data(const TypedArray<Image> &p_data) {
|
||||
} else {
|
||||
texture = RS::get_singleton()->texture_3d_create(data[0]->get_format(), data[0]->get_width(), data[0]->get_height(), data.size(), false, data);
|
||||
}
|
||||
format = data[0]->get_format();
|
||||
}
|
||||
emit_changed();
|
||||
}
|
||||
@ -346,6 +347,5 @@ Vector<Ref<Image>> NoiseTexture3D::get_data() const {
|
||||
}
|
||||
|
||||
Image::Format NoiseTexture3D::get_format() const {
|
||||
ERR_FAIL_COND_V(!texture.is_valid(), Image::FORMAT_L8);
|
||||
return RS::get_singleton()->texture_3d_get(texture)[0]->get_format();
|
||||
return format;
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ private:
|
||||
Ref<Gradient> color_ramp;
|
||||
Ref<Noise> noise;
|
||||
|
||||
Image::Format format = Image::FORMAT_L8;
|
||||
|
||||
void _thread_done(const TypedArray<Image> &p_data);
|
||||
static void _thread_function(void *p_ud);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user