mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Implement rendering pipeline and post-processing (#12465)
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
This commit is contained in:
parent
464043b8ab
commit
ff6dcfea82
32 changed files with 1476 additions and 565 deletions
|
@ -707,3 +707,22 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
|
|||
|
||||
return prefix + content;
|
||||
}
|
||||
|
||||
ShadowRenderer *createShadowRenderer(IrrlichtDevice *device, Client *client)
|
||||
{
|
||||
// disable if unsupported
|
||||
if (g_settings->getBool("enable_dynamic_shadows") && (
|
||||
g_settings->get("video_driver") != "opengl" ||
|
||||
!g_settings->getBool("enable_shaders"))) {
|
||||
g_settings->setBool("enable_dynamic_shadows", false);
|
||||
}
|
||||
|
||||
if (g_settings->getBool("enable_shaders") &&
|
||||
g_settings->getBool("enable_dynamic_shadows")) {
|
||||
ShadowRenderer *shadow_renderer = new ShadowRenderer(device, client);
|
||||
shadow_renderer->initialize();
|
||||
return shadow_renderer;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue