diff --git a/filament/include/filament/View.h b/filament/include/filament/View.h index d4c9848de8f..139dcac7f40 100644 --- a/filament/include/filament/View.h +++ b/filament/include/filament/View.h @@ -570,6 +570,13 @@ class UTILS_PUBLIC View : public FilamentAPI { */ void setShadowType(ShadowType shadow) noexcept; + /** + * Returns the shadow mapping technique used by this View. + * + * @return value set by setShadowType(). + */ + ShadowType getShadowType() const noexcept; + /** * Sets VSM shadowing options that apply across the entire View. * diff --git a/filament/src/View.cpp b/filament/src/View.cpp index 65635f3f647..0d5d3aa61ca 100644 --- a/filament/src/View.cpp +++ b/filament/src/View.cpp @@ -193,6 +193,10 @@ void View::setShadowType(View::ShadowType shadow) noexcept { downcast(this)->setShadowType(shadow); } +View::ShadowType View::getShadowType() const noexcept { + return downcast(this)->getShadowType(); +} + void View::setVsmShadowOptions(VsmShadowOptions const& options) noexcept { downcast(this)->setVsmShadowOptions(options); }