summaryrefslogtreecommitdiff
path: root/editor/import/scene_importer_mesh.h
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-01-25 12:20:11 -0300
committerreduz <reduzio@gmail.com>2021-01-25 15:03:15 -0300
commit51d8e32c937f9e0fd75ce86b0d48848255723bd4 (patch)
treec65ed356cc9b4fd634a15827a12cecb7e0e05b05 /editor/import/scene_importer_mesh.h
parentc5c9517e1e03175e9cdc483d3dce27fc531af2be (diff)
Implement shadow meshes
-When importing, a vertex-only version of the mesh is created. -This version is used when rendering shadows, and improves performance by reducing bandwidth -It's automatic, but can optionally be used by users, in case they want to make special versions of geometry for shadow casting.
Diffstat (limited to 'editor/import/scene_importer_mesh.h')
-rw-r--r--editor/import/scene_importer_mesh.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/import/scene_importer_mesh.h b/editor/import/scene_importer_mesh.h
index 2adeb76b6c..42507cbe8c 100644
--- a/editor/import/scene_importer_mesh.h
+++ b/editor/import/scene_importer_mesh.h
@@ -61,6 +61,8 @@ class EditorSceneImporterMesh : public Resource {
Ref<ArrayMesh> mesh;
+ Ref<EditorSceneImporterMesh> shadow_mesh;
+
protected:
void _set_data(const Dictionary &p_data);
Dictionary _get_data() const;
@@ -89,6 +91,9 @@ public:
void generate_lods();
+ void create_shadow_mesh();
+ Ref<EditorSceneImporterMesh> get_shadow_mesh() const;
+
bool has_mesh() const;
Ref<ArrayMesh> get_mesh();
void clear();