Viewport #94
|
@ -550,10 +550,9 @@ namespace SHADE
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle<SHVkDescriptorSetLayout> SHVkLogicalDevice::CreateDescriptorSetLayout(SetIndex setIndex, std::vector<SHVkDescriptorSetLayout::Binding> const& bindings) noexcept
|
Handle<SHVkDescriptorSetLayout> SHVkLogicalDevice::CreateDescriptorSetLayout(SetIndex setIndex, std::vector<SHVkDescriptorSetLayout::Binding> const& bindings, bool genImmutableSamplers/* = false*/) noexcept
|
||||||
{
|
{
|
||||||
return SHVkInstance::GetResourceManager().Create <SHVkDescriptorSetLayout>(GetHandle(), setIndex, bindings);
|
return SHVkInstance::GetResourceManager().Create <SHVkDescriptorSetLayout>(GetHandle(), setIndex, bindings, genImmutableSamplers);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle<SHVkDescriptorPool> SHVkLogicalDevice::CreateDescriptorPools(const SHVkDescriptorPool::Config& config /*= {}*/) noexcept
|
Handle<SHVkDescriptorPool> SHVkLogicalDevice::CreateDescriptorPools(const SHVkDescriptorPool::Config& config /*= {}*/) noexcept
|
||||||
|
|
|
@ -186,7 +186,7 @@ namespace SHADE
|
||||||
Handle<SHVkRenderpass> CreateRenderpass (std::span<vk::AttachmentDescription> const vkDescriptions, std::vector<SHVkSubpassParams> const& subpasses) noexcept;
|
Handle<SHVkRenderpass> CreateRenderpass (std::span<vk::AttachmentDescription> const vkDescriptions, std::vector<SHVkSubpassParams> const& subpasses) noexcept;
|
||||||
Handle<SHVkRenderpass> CreateRenderpass (std::span<vk::AttachmentDescription> const vkDescriptions, std::span<vk::SubpassDescription> const spDescs, std::span<vk::SubpassDependency> const spDeps) noexcept;
|
Handle<SHVkRenderpass> CreateRenderpass (std::span<vk::AttachmentDescription> const vkDescriptions, std::span<vk::SubpassDescription> const spDescs, std::span<vk::SubpassDependency> const spDeps) noexcept;
|
||||||
Handle<SHVkFramebuffer> CreateFramebuffer (Handle<SHVkRenderpass> const& renderpassHdl, std::vector<Handle<SHVkImageView>> const& attachments, uint32_t inWidth, uint32_t inHeight) noexcept;
|
Handle<SHVkFramebuffer> CreateFramebuffer (Handle<SHVkRenderpass> const& renderpassHdl, std::vector<Handle<SHVkImageView>> const& attachments, uint32_t inWidth, uint32_t inHeight) noexcept;
|
||||||
Handle<SHVkDescriptorSetLayout> CreateDescriptorSetLayout (SetIndex setIndex, std::vector<SHVkDescriptorSetLayout::Binding> const& bindings) noexcept;
|
Handle<SHVkDescriptorSetLayout> CreateDescriptorSetLayout (SetIndex setIndex, std::vector<SHVkDescriptorSetLayout::Binding> const& bindings, bool genImmutableSamplers = false) noexcept;
|
||||||
Handle<SHVkDescriptorPool> CreateDescriptorPools (const SHVkDescriptorPool::Config& config = {}) noexcept;
|
Handle<SHVkDescriptorPool> CreateDescriptorPools (const SHVkDescriptorPool::Config& config = {}) noexcept;
|
||||||
Handle<SHVkDescriptorSetGroup> CreateDescriptorSetGroup(Handle<SHVkDescriptorPool> pool,
|
Handle<SHVkDescriptorSetGroup> CreateDescriptorSetGroup(Handle<SHVkDescriptorPool> pool,
|
||||||
std::vector<Handle<SHVkDescriptorSetLayout>> const& layouts,
|
std::vector<Handle<SHVkDescriptorSetLayout>> const& layouts,
|
||||||
|
|
|
@ -30,8 +30,9 @@ namespace SHADE
|
||||||
.addressModeU = params.addressMode,
|
.addressModeU = params.addressMode,
|
||||||
.addressModeV = params.addressMode,
|
.addressModeV = params.addressMode,
|
||||||
.addressModeW = params.addressMode,
|
.addressModeW = params.addressMode,
|
||||||
|
.maxAnisotropy = 1.0f,
|
||||||
.minLod = params.minLod,
|
.minLod = params.minLod,
|
||||||
.maxLod = params.maxLod
|
.maxLod = params.maxLod,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create the sampler
|
// Create the sampler
|
||||||
|
|
|
@ -560,6 +560,7 @@ namespace SHADE
|
||||||
worldRenderGraph->HandleResize(windowDims.first, windowDims.second);
|
worldRenderGraph->HandleResize(windowDims.first, windowDims.second);
|
||||||
|
|
||||||
mousePickSystem->HandleResize();
|
mousePickSystem->HandleResize();
|
||||||
|
//postOffscreenRender->HandleResize();
|
||||||
|
|
||||||
defaultViewport->SetWidth(static_cast<float>(windowDims.first));
|
defaultViewport->SetWidth(static_cast<float>(windowDims.first));
|
||||||
defaultViewport->SetHeight(static_cast<float>(windowDims.second));
|
defaultViewport->SetHeight(static_cast<float>(windowDims.second));
|
||||||
|
|
|
@ -56,14 +56,14 @@ namespace SHADE
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create descriptor set layout
|
// Create descriptor set layout
|
||||||
offscreenRenderDescSetLayout = logicalDevice->CreateDescriptorSetLayout(0, { imageBinding });
|
offscreenRenderDescSetLayout = logicalDevice->CreateDescriptorSetLayout(0, { imageBinding }, true);
|
||||||
|
|
||||||
// Create descriptor set
|
// Create descriptor set
|
||||||
offscreenRenderDescSet = descriptorPool->Allocate({ offscreenRenderDescSetLayout }, { 1 });
|
offscreenRenderDescSet = descriptorPool->Allocate({ offscreenRenderDescSetLayout }, { 1 });
|
||||||
|
|
||||||
std::vector combinedImageSampler
|
std::vector combinedImageSampler
|
||||||
{
|
{
|
||||||
std::make_tuple(renderGraphResource->GetImageView(), offscreenRenderSampler, vk::ImageLayout::eShaderReadOnlyOptimal),
|
std::make_tuple(renderGraphResource->GetImageView(), Handle<SHVkSampler>{}, vk::ImageLayout::eShaderReadOnlyOptimal),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Register the image view and sampler with the descriptor set. Now whenever rendering to the offscreen image is done, the descriptor set will see the change
|
// Register the image view and sampler with the descriptor set. Now whenever rendering to the offscreen image is done, the descriptor set will see the change
|
||||||
|
|
Loading…
Reference in New Issue