diff options
| author | Juan Linietsky | 2017-09-22 09:20:28 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-09-22 09:20:52 -0300 |
| commit | 3237e05c3608fc900cb30519ffd3b15ddb064c9f (patch) | |
| tree | 4e00adabf93d4da04a467d88b70586b65ae315ef /scene/resources/material.cpp | |
| parent | 779426d2df8af5173e1f44a4c63fea863b57e461 (diff) | |
| download | godot-3237e05c3608fc900cb30519ffd3b15ddb064c9f.tar.gz godot-3237e05c3608fc900cb30519ffd3b15ddb064c9f.tar.zst godot-3237e05c3608fc900cb30519ffd3b15ddb064c9f.zip | |
Diffstat (limited to 'scene/resources/material.cpp')
| -rw-r--r-- | scene/resources/material.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 553e9b990..ae858e862 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -1611,6 +1611,12 @@ float SpatialMaterial::get_distance_fade_min_distance() const { return distance_fade_min_distance; } +RID SpatialMaterial::get_shader_rid() const { + + ERR_FAIL_COND_V(!shader_map.has(current_key), RID()); + return shader_map[current_key].shader; +} + void SpatialMaterial::_bind_methods() { ClassDB::bind_method(D_METHOD("set_albedo", "albedo"), &SpatialMaterial::set_albedo); |
