- add cvar r_skipmats - speeds up rendering on slower cards for mods that use a lot of specularity/pbr, effective on both the opengl and vulkan backends

This commit is contained in:
Rachael Alexanderson 2021-10-20 06:49:45 -04:00
commit bb44f3dcd9
3 changed files with 10 additions and 0 deletions

View file

@ -49,6 +49,8 @@
#include <map>
#include <memory>
EXTERN_CVAR(Bool, r_skipmats)
namespace OpenGLRenderer
{
@ -729,6 +731,9 @@ FShader *FShaderManager::BindEffect(int effect, EPassType passType)
FShader *FShaderManager::Get(unsigned int eff, bool alphateston, EPassType passType)
{
if (r_skipmats && eff >= 3 && eff <= 4)
eff = 0;
if (passType < mPassShaders.Size())
return mPassShaders[passType]->Get(eff, alphateston);
else