Move DefaultProbeResolution from Graphics to GraphicsSettings only (not runtime option)

#728
This commit is contained in:
Wojciech Figat
2022-07-14 15:37:54 +02:00
parent 53baccaf96
commit a8579cadcc
15 changed files with 98 additions and 96 deletions

View File

@@ -1082,3 +1082,26 @@ enum class ShaderFlags : uint32
};
DECLARE_ENUM_OPERATORS(ShaderFlags);
/// <summary>
/// The environment probes cubemap texture resolutions.
/// </summary>
API_ENUM() enum class ProbeCubemapResolution
{
// Graphics Settings default option.
UseGraphicsSettings = 0,
// Cubemap with 32x32.
_32 = 32,
// Cubemap with 64x64.
_64 = 64,
// Cubemap with 128x128.
_128 = 128,
// Cubemap with 256x256.
_256 = 256,
// Cubemap with 512x512.
_512 = 512,
// Cubemap with 1024x1024.
_1024 = 1024,
// Cubemap with 2048x2048.
_2048 = 2048,
};

View File

@@ -14,7 +14,6 @@ Quality Graphics::VolumetricFogQuality = Quality::High;
Quality Graphics::ShadowsQuality = Quality::Medium;
Quality Graphics::ShadowMapsQuality = Quality::Medium;
bool Graphics::AllowCSMBlending = false;
int32 Graphics::DefaultProbeResolution = 512;
Quality Graphics::GlobalSDFQuality = Quality::High;
Quality Graphics::GIQuality = Quality::High;
PostProcessSettings Graphics::PostProcessSettings;

View File

@@ -53,11 +53,6 @@ public:
/// </summary>
API_FIELD() static bool AllowCSMBlending;
/// <summary>
/// Default probes cubemap resolution.
/// </summary>
API_FIELD() static int32 DefaultProbeResolution;
/// <summary>
/// The Global SDF quality. Controls the volume texture resolution and amount of cascades to use.
/// </summary>

View File

@@ -551,6 +551,8 @@ bool GPUTexture::Resize(int32 width, int32 height, int32 depth)
desc.Width = width;
desc.Height = height;
desc.Depth = depth;
if (desc.MipLevels > 1)
desc.MipLevels = CalculateMipMapCount(0, Math::Max(width, height));
// Recreate
return Init(desc);