diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 3a6575f9b..8f089fbdd 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -513,6 +513,7 @@ void IrrDriver::initDevice() hasDrawIndirect = false; hasComputeShaders = false; hasTextureStorage = false; + hasTextureView = false; // Default false value for hasVSLayer if --no-graphics argument is used #if !defined(__APPLE__) if (!ProfileWorld::isNoGraphics()) @@ -541,6 +542,10 @@ void IrrDriver::initDevice() hasTextureStorage = true; Log::info("GLDriver", "ARB Texture Storage enabled"); } + if (hasGLExtension("GL_ARB_texture_view")) { + hasTextureView = true; + Log::info("GLDriver", "ARB Texture View enabled"); + } } #endif diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index 17740981a..1dc1f29e0 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -180,6 +180,7 @@ private: bool hasBuffserStorage; bool hasComputeShaders; bool hasTextureStorage; + bool hasTextureView; bool m_need_ubo_workaround; bool m_need_rh_workaround; bool m_need_srgb_workaround; @@ -311,6 +312,11 @@ public: return hasTextureStorage; } + bool hasARBTextureView() const + { + return hasTextureView; + } + video::SColorf getAmbientLight() const; struct GlowData { diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index 6ba414e1a..d5fe29c4b 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -1026,7 +1026,8 @@ void IrrDriver::renderShadows() glDisable(GL_POLYGON_OFFSET_FILL); - m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO()); + if (irr_driver->hasARBTextureView()) + m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO()); glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]); glGenerateMipmap(GL_TEXTURE_2D_ARRAY); }