diff options
| author | Juan Linietsky | 2017-12-06 19:43:22 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-12-06 19:51:13 -0300 |
| commit | 7b7ba584938a276f5fe118bf46a9a9e7aab22655 (patch) | |
| tree | af84a33b749cc34f348e443a09c2330d9863e320 /scene/resources/material.cpp | |
| parent | e334b0c4b29aa018dfa4a292598c3041f2a32730 (diff) | |
| download | godot-7b7ba584938a276f5fe118bf46a9a9e7aab22655.tar.gz godot-7b7ba584938a276f5fe118bf46a9a9e7aab22655.tar.zst godot-7b7ba584938a276f5fe118bf46a9a9e7aab22655.zip | |
-Fix particles with size==0, closes #13931
-Fixed material previews (dont show sphere unless for spatial)
Diffstat (limited to 'scene/resources/material.cpp')
| -rw-r--r-- | scene/resources/material.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 15710f4c1..a6f301af1 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -215,6 +215,13 @@ bool ShaderMaterial::_can_do_next_pass() const { return shader.is_valid() && shader->get_mode() == Shader::MODE_SPATIAL; } +Shader::Mode ShaderMaterial::get_shader_mode() const { + if (shader.is_valid()) + return shader->get_mode(); + else + return Shader::MODE_SPATIAL; +} + ShaderMaterial::ShaderMaterial() { } @@ -1662,6 +1669,11 @@ RID SpatialMaterial::get_shader_rid() const { return shader_map[current_key].shader; } +Shader::Mode SpatialMaterial::get_shader_mode() const { + + return Shader::MODE_SPATIAL; +} + void SpatialMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("set_albedo", "albedo"), &SpatialMaterial::set_albedo); |
