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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue