- 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:
parent
2fc1481202
commit
bb44f3dcd9
3 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue