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,
|
||||||
|
|
|
@ -24,14 +24,15 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
const vk::SamplerCreateInfo SAMPLER_CREATE_INFO
|
const vk::SamplerCreateInfo SAMPLER_CREATE_INFO
|
||||||
{
|
{
|
||||||
.magFilter = params.magFilter,
|
.magFilter = params.magFilter,
|
||||||
.minFilter = params.minFilter,
|
.minFilter = params.minFilter,
|
||||||
.mipmapMode = params.mipmapMode,
|
.mipmapMode = params.mipmapMode,
|
||||||
.addressModeU = params.addressMode,
|
.addressModeU = params.addressMode,
|
||||||
.addressModeV = params.addressMode,
|
.addressModeV = params.addressMode,
|
||||||
.addressModeW = params.addressMode,
|
.addressModeW = params.addressMode,
|
||||||
.minLod = params.minLod,
|
.maxAnisotropy = 1.0f,
|
||||||
.maxLod = params.maxLod
|
.minLod = params.minLod,
|
||||||
|
.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