diff --git a/apps/openmw/mwrender/postprocessor.cpp b/apps/openmw/mwrender/postprocessor.cpp index 1c0702879d..59559d70e7 100644 --- a/apps/openmw/mwrender/postprocessor.cpp +++ b/apps/openmw/mwrender/postprocessor.cpp @@ -409,10 +409,14 @@ namespace MWRender mViewer->stopThreading(); - auto& shaderManager = MWBase::Environment::get().getResourceSystem()->getSceneManager()->getShaderManager(); - auto defines = shaderManager.getGlobalDefines(); - defines["disableNormals"] = mNormals ? "0" : "1"; - shaderManager.setGlobalDefines(defines); + if (mNormalsSupported) + { + auto& shaderManager + = MWBase::Environment::get().getResourceSystem()->getSceneManager()->getShaderManager(); + auto defines = shaderManager.getGlobalDefines(); + defines["disableNormals"] = mNormals ? "0" : "1"; + shaderManager.setGlobalDefines(defines); + } mRendering.getLightRoot()->setCollectPPLights(mPassLights); mStateUpdater->bindPointLights(mPassLights ? mRendering.getLightRoot()->getPPLightsBuffer() : nullptr); diff --git a/components/fx/parse_constants.hpp b/components/fx/parse_constants.hpp index 9be54ed3a7..2057476f3e 100644 --- a/components/fx/parse_constants.hpp +++ b/components/fx/parse_constants.hpp @@ -35,7 +35,7 @@ namespace fx { "bgra", GL_BGRA }, } }; - constexpr std::array, 9> SourceType = { { + constexpr std::array, 10> SourceType = { { { "byte", GL_BYTE }, { "unsigned_byte", GL_UNSIGNED_BYTE }, { "short", GL_SHORT }, @@ -43,6 +43,7 @@ namespace fx { "int", GL_INT }, { "unsigned_int", GL_UNSIGNED_INT }, { "unsigned_int_24_8", GL_UNSIGNED_INT_24_8 }, + { "half_float", GL_HALF_FLOAT }, { "float", GL_FLOAT }, { "double", GL_DOUBLE }, } }; @@ -129,4 +130,4 @@ namespace fx } } -#endif \ No newline at end of file +#endif diff --git a/files/data/shaders/bloomlinear.omwfx b/files/data/shaders/bloomlinear.omwfx index 3de7139f39..4c583a9a89 100644 --- a/files/data/shaders/bloomlinear.omwfx +++ b/files/data/shaders/bloomlinear.omwfx @@ -80,8 +80,8 @@ shared { radius = max(radius, 0.1); // hack: make the radius wider on the screen edges // (makes things in the corner of the screen look less "wrong" with not-extremely-low FOVs) - radius *= pow(texcoord.x*2.0-1.0, 2)+1.0; - radius *= pow(texcoord.y*2.0-1.0, 2)+1.0; + radius *= pow(texcoord.x*2.0-1.0, 2.0)+1.0; + radius *= pow(texcoord.y*2.0-1.0, 2.0)+1.0; return radius; } vec3 powv(vec3 a, float x) @@ -94,7 +94,7 @@ render_target RT_NoMipmap { width_ratio = 0.25; height_ratio = 0.25; internal_format = rgb16f; - source_type = float; + source_type = half_float; source_format = rgb; mipmaps = false; min_filter = nearest; @@ -105,7 +105,7 @@ render_target RT_Horizontal { width_ratio = 0.25; height_ratio = 0.25; internal_format = rgb16f; - source_type = float; + source_type = half_float; source_format = rgb; mipmaps = false; min_filter = nearest; @@ -116,7 +116,7 @@ render_target RT_Vertical { width_ratio = 0.25; height_ratio = 0.25; internal_format = rgb16f; - source_type = float; + source_type = half_float; source_format = rgb; mipmaps = false; min_filter = linear;