WIP
This commit is contained in:
parent
0d02ece4c1
commit
1117ecc5ef
|
@ -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
|
||||
|
|
|
@ -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::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<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<SHVkDescriptorSetGroup> CreateDescriptorSetGroup(Handle<SHVkDescriptorPool> pool,
|
||||
std::vector<Handle<SHVkDescriptorSetLayout>> const& layouts,
|
||||
|
|
|
@ -24,14 +24,15 @@ namespace SHADE
|
|||
{
|
||||
const vk::SamplerCreateInfo SAMPLER_CREATE_INFO
|
||||
{
|
||||
.magFilter = params.magFilter,
|
||||
.minFilter = params.minFilter,
|
||||
.mipmapMode = params.mipmapMode,
|
||||
.addressModeU = params.addressMode,
|
||||
.addressModeV = params.addressMode,
|
||||
.addressModeW = params.addressMode,
|
||||
.minLod = params.minLod,
|
||||
.maxLod = params.maxLod
|
||||
.magFilter = params.magFilter,
|
||||
.minFilter = params.minFilter,
|
||||
.mipmapMode = params.mipmapMode,
|
||||
.addressModeU = params.addressMode,
|
||||
.addressModeV = params.addressMode,
|
||||
.addressModeW = params.addressMode,
|
||||
.maxAnisotropy = 1.0f,
|
||||
.minLod = params.minLod,
|
||||
.maxLod = params.maxLod,
|
||||
};
|
||||
|
||||
// Create the sampler
|
||||
|
|
|
@ -560,6 +560,7 @@ namespace SHADE
|
|||
worldRenderGraph->HandleResize(windowDims.first, windowDims.second);
|
||||
|
||||
mousePickSystem->HandleResize();
|
||||
//postOffscreenRender->HandleResize();
|
||||
|
||||
defaultViewport->SetWidth(static_cast<float>(windowDims.first));
|
||||
defaultViewport->SetHeight(static_cast<float>(windowDims.second));
|
||||
|
|
|
@ -56,14 +56,14 @@ namespace SHADE
|
|||
};
|
||||
|
||||
// Create descriptor set layout
|
||||
offscreenRenderDescSetLayout = logicalDevice->CreateDescriptorSetLayout(0, { imageBinding });
|
||||
offscreenRenderDescSetLayout = logicalDevice->CreateDescriptorSetLayout(0, { imageBinding }, true);
|
||||
|
||||
// Create descriptor set
|
||||
offscreenRenderDescSet = descriptorPool->Allocate({ offscreenRenderDescSetLayout }, { 1 });
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue