1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

workarounds for gl4es

This commit is contained in:
cody glassman 2022-05-15 09:36:21 -07:00
parent 205452b482
commit dae0914820
2 changed files with 13 additions and 2 deletions

View file

@ -110,6 +110,10 @@ namespace MWRender
if (!ext->glDisablei && ext->glDisableIndexedEXT) if (!ext->glDisablei && ext->glDisableIndexedEXT)
ext->glDisablei = ext->glDisableIndexedEXT; ext->glDisablei = ext->glDisableIndexedEXT;
#ifdef ANDROID
ext->glDisablei = nullptr;
#endif
if (ext->glDisablei) if (ext->glDisablei)
mNormalsSupported = true; mNormalsSupported = true;
else else
@ -172,11 +176,18 @@ namespace MWRender
{ {
mReload = true; mReload = true;
mEnabled = true; mEnabled = true;
bool postPass = Settings::Manager::getBool("transparent postpass", "Post Processing");
mUsePostProcessing = usePostProcessing && !Stereo::getStereo() && !Stereo::getMultiview(); mUsePostProcessing = usePostProcessing && !Stereo::getStereo() && !Stereo::getMultiview();
mDisableDepthPasses = !mSoftParticles && !postPass;
#ifdef ANDROID
mDisableDepthPasses = true;
#endif
if (!mDisableDepthPasses && !Stereo::getStereo() && !Stereo::getMultiview()) if (!mDisableDepthPasses && !Stereo::getStereo() && !Stereo::getMultiview())
{ {
mTransparentDepthPostPass = new TransparentDepthBinCallback(mRendering.getResourceSystem()->getSceneManager()->getShaderManager(), Settings::Manager::getBool("transparent postpass", "Post Processing")); mTransparentDepthPostPass = new TransparentDepthBinCallback(mRendering.getResourceSystem()->getSceneManager()->getShaderManager(), postPass);
osgUtil::RenderBin::getRenderBinPrototype("DepthSortedBin")->setDrawCallback(mTransparentDepthPostPass); osgUtil::RenderBin::getRenderBinPrototype("DepthSortedBin")->setDrawCallback(mTransparentDepthPostPass);
} }

View file

@ -75,7 +75,7 @@ namespace fx
uniform @builtinSampler omw_SamplerLastShader; uniform @builtinSampler omw_SamplerLastShader;
uniform @builtinSampler omw_SamplerLastPass; uniform @builtinSampler omw_SamplerLastPass;
uniform @builtinSampler omw_SamplerDepth; uniform highp @builtinSampler omw_SamplerDepth;
uniform @builtinSampler omw_SamplerNormals; uniform @builtinSampler omw_SamplerNormals;
uniform vec4 omw_PointLights[@pointLightCount]; uniform vec4 omw_PointLights[@pointLightCount];