From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/VramLimits.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Runtime/GfxDevice/VramLimits.h (limited to 'Runtime/GfxDevice/VramLimits.h') diff --git a/Runtime/GfxDevice/VramLimits.h b/Runtime/GfxDevice/VramLimits.h new file mode 100644 index 0000000..238f260 --- /dev/null +++ b/Runtime/GfxDevice/VramLimits.h @@ -0,0 +1,11 @@ +#pragma once + +// Various limits for what we can do based on VRAM size + +#define kVRAMEnoughForLargeShadowmaps 480 // VRAM MB after which we allow even higher resolution shadow maps + +#define kVRAMMaxFreePortionForShadowMap 0.3f // allow single shadowmap to take 30% of possibly free VRAM +#define kVRAMMaxFreePortionForTexture 0.4f // allow single texture to take 40% of possibly free VRAM + + +int ChooseSuitableFSAALevel( int width, int height, int backbufferBPP, int frontbufferBPP, int depthBPP, int fsaa ); -- cgit v1.1-26-g67d0