summaryrefslogtreecommitdiff
path: root/scene/3d/voxel_gi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/voxel_gi.cpp')
-rw-r--r--scene/3d/voxel_gi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp
index e00be9204c..5558930df8 100644
--- a/scene/3d/voxel_gi.cpp
+++ b/scene/3d/voxel_gi.cpp
@@ -55,7 +55,7 @@ void VoxelGIData::_set_data(const Dictionary &p_data) {
} else if (p_data.has("octree_df_png")) {
Vector<uint8_t> octree_df_png = p_data["octree_df_png"];
Ref<Image> img;
- img.instance();
+ img.instantiate();
Error err = img->load_png_from_buffer(octree_df_png);
ERR_FAIL_COND(err != OK);
ERR_FAIL_COND(img->get_format() != Image::FORMAT_L8);
@@ -76,7 +76,7 @@ Dictionary VoxelGIData::_get_data() const {
d["octree_data"] = get_data_cells();
if (otsize != Vector3i()) {
Ref<Image> img;
- img.instance();
+ img.instantiate();
img->create(otsize.x * otsize.y, otsize.z, false, Image::FORMAT_L8, get_distance_field());
Vector<uint8_t> df_png = img->save_png_to_buffer();
ERR_FAIL_COND_V(df_png.size() == 0, Dictionary());
@@ -467,7 +467,7 @@ void VoxelGI::bake(Node *p_from_node, bool p_create_visual_debug) {
Ref<VoxelGIData> probe_data = get_probe_data();
if (probe_data.is_null()) {
- probe_data.instance();
+ probe_data.instantiate();
}
if (bake_step_function) {