Move constants from VkLightProber to DFrameBuffer
This commit is contained in:
parent
7dc050edb0
commit
666f38ee71
4 changed files with 12 additions and 14 deletions
|
|
@ -130,6 +130,14 @@ public:
|
|||
int mPipelineNbr = 1; // Number of HW buffers to pipeline
|
||||
int mPipelineType = 0;
|
||||
|
||||
// Lightprobes
|
||||
constexpr static const int irrandiaceMapTexelCount = 32 * 32 * 6;
|
||||
constexpr static const int prefilterMapLevelsSize = 5;
|
||||
constexpr static const int prefilterMapTexelCount = prefilterMapLevelsSize * 6;
|
||||
|
||||
constexpr static const int irradianceMapChannelCount = 3;
|
||||
constexpr static const int prefilterMapChannelCount = 3;
|
||||
|
||||
public:
|
||||
DFrameBuffer (int width=1, int height=1);
|
||||
virtual ~DFrameBuffer();
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ void VkLightprober::CreateIrradianceMap()
|
|||
|
||||
bool VkLightprober::GenerateIrradianceMap(TArrayView<uint16_t>& databuffer)
|
||||
{
|
||||
const int texelCount = irrandiaceMapTexelCount;
|
||||
const int texelCount = DFrameBuffer::irrandiaceMapTexelCount;
|
||||
|
||||
if (databuffer.Size() < texelCount)
|
||||
{
|
||||
|
|
@ -405,7 +405,7 @@ void VkLightprober::CreatePrefilterMap()
|
|||
|
||||
bool VkLightprober::GeneratePrefilterMap(TArrayView<uint16_t>& databuffer)
|
||||
{
|
||||
const int texelCount = prefilterMapTexelCount;
|
||||
const int texelCount = DFrameBuffer::prefilterMapTexelCount;
|
||||
|
||||
if (databuffer.Size() < texelCount)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ private:
|
|||
{
|
||||
enum
|
||||
{
|
||||
maxlevels = 5,
|
||||
maxlevels = DFrameBuffer::prefilterMapLevelsSize,
|
||||
levelsSize = 128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8
|
||||
};
|
||||
std::unique_ptr<VulkanShader> shader;
|
||||
|
|
@ -108,12 +108,4 @@ private:
|
|||
} prefilterMap;
|
||||
|
||||
VulkanRenderDevice* fb = nullptr;
|
||||
|
||||
public:
|
||||
// Used to pass buffer sizes
|
||||
constexpr static const int irrandiaceMapTexelCount = 32 * 32 * 6;
|
||||
constexpr static const int prefilterMapTexelCount = PrefilterMap::levelsSize * 6;
|
||||
|
||||
constexpr static const int irradianceMapChannelCount = 3;
|
||||
constexpr static const int prefilterMapChannelCount = 3;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@
|
|||
#include "hwrenderer/scene/hw_drawcontext.h"
|
||||
#include "hw_vrmodes.h"
|
||||
|
||||
#include "common/rendering/vulkan/vk_lightprober.h" // to fetch irradiance and prefilter map texel counts
|
||||
|
||||
EXTERN_CVAR(Bool, cl_capfps)
|
||||
EXTERN_CVAR(Float, r_visibility)
|
||||
EXTERN_CVAR(Bool, gl_bandedswlight)
|
||||
|
|
@ -335,7 +333,7 @@ static void CheckTimer(FRenderState &state, uint64_t ShaderStartTime)
|
|||
state.firstFrame = screen->FrameTime - 1;
|
||||
}
|
||||
|
||||
LightProbeIncrementalBuilder lightProbeBuilder(VkLightprober::irrandiaceMapTexelCount, VkLightprober::prefilterMapTexelCount, VkLightprober::irradianceMapChannelCount, VkLightprober::prefilterMapChannelCount);
|
||||
LightProbeIncrementalBuilder lightProbeBuilder(DFrameBuffer::irrandiaceMapTexelCount, DFrameBuffer::prefilterMapTexelCount, DFrameBuffer::irradianceMapChannelCount, DFrameBuffer::prefilterMapChannelCount);
|
||||
|
||||
sector_t* RenderView(player_t* player)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue