|
|
@ -128,6 +128,7 @@ namespace SHADE
|
|
|
|
SHFreetypeInstance::Init();
|
|
|
|
SHFreetypeInstance::Init();
|
|
|
|
|
|
|
|
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/DeferredComposite_CS.glsl", false);
|
|
|
|
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/ShadowMap_FS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/SSAO_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/SSAOBlur_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/SSAOBlur_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/PureCopy_CS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/PureCopy_CS.glsl", false);
|
|
|
@ -137,6 +138,7 @@ namespace SHADE
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/UI_FS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/UI_FS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/Text_VS.glsl", false);
|
|
|
|
//SHAssetManager::CompileAsset("../../Assets/Shaders/Text_VS.glsl", false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Load Built In Shaders
|
|
|
|
// Load Built In Shaders
|
|
|
|
static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_DEFAULT);
|
|
|
|
static constexpr AssetID VS_DEFAULT = 39210065; defaultVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_DEFAULT);
|
|
|
|
static constexpr AssetID VS_ANIM = 47911992; animtVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_ANIM);
|
|
|
|
static constexpr AssetID VS_ANIM = 47911992; animtVertShader = SHResourceManager::LoadOrGet<SHVkShaderModule>(VS_ANIM);
|
|
|
@ -151,7 +153,8 @@ namespace SHADE
|
|
|
|
static constexpr AssetID TEXT_FS = 38024754; textFS = SHResourceManager::LoadOrGet<SHVkShaderModule>(TEXT_FS);
|
|
|
|
static constexpr AssetID TEXT_FS = 38024754; textFS = SHResourceManager::LoadOrGet<SHVkShaderModule>(TEXT_FS);
|
|
|
|
static constexpr AssetID RENDER_SC_VS = 48082949; renderToSwapchainVS = SHResourceManager::LoadOrGet<SHVkShaderModule>(RENDER_SC_VS);
|
|
|
|
static constexpr AssetID RENDER_SC_VS = 48082949; renderToSwapchainVS = SHResourceManager::LoadOrGet<SHVkShaderModule>(RENDER_SC_VS);
|
|
|
|
static constexpr AssetID RENDER_SC_FS = 36869006; renderToSwapchainFS = SHResourceManager::LoadOrGet<SHVkShaderModule>(RENDER_SC_FS);
|
|
|
|
static constexpr AssetID RENDER_SC_FS = 36869006; renderToSwapchainFS = SHResourceManager::LoadOrGet<SHVkShaderModule>(RENDER_SC_FS);
|
|
|
|
static constexpr AssetID SHADOW_MAP_VS = 44646107; shadowMapVS = SHResourceManager::LoadOrGet<SHVkShaderModule>(SHADOW_MAP_VS);
|
|
|
|
static constexpr AssetID SHADOW_MAP_VS = 44646107; shadowMapVS = SHResourceManager::LoadOrGet<SHVkShaderModule>(SHADOW_MAP_VS);
|
|
|
|
|
|
|
|
static constexpr AssetID SHADOW_MAP_FS = 45925790; shadowMapFS = SHResourceManager::LoadOrGet<SHVkShaderModule>(SHADOW_MAP_FS);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -583,14 +586,21 @@ namespace SHADE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//if (SHInputManager::GetKeyDown(SHInputManager::SH_KEYCODE::B))
|
|
|
|
static bool shadowAdded = false;
|
|
|
|
//{
|
|
|
|
|
|
|
|
// auto& lightComps = SHComponentManager::GetDense<SHLightComponent>();
|
|
|
|
if (shadowAdded == false/* && SHInputManager::GetKey(SHInputManager::SH_KEYCODE::B)*/)
|
|
|
|
// for (auto& comp : lightComps)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
shadowAdded = true;
|
|
|
|
// comp.SetEnableShadow(true);
|
|
|
|
auto& lightComps = SHComponentManager::GetDense<SHLightComponent>();
|
|
|
|
// }
|
|
|
|
if (lightComps.size() > 2)
|
|
|
|
//}
|
|
|
|
{
|
|
|
|
|
|
|
|
lightComps[2].SetEnableShadow(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//for (auto& comp : lightComps)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// comp.SetEnableShadow(true);
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
renderGraph->Begin(frameIndex);
|
|
|
|
renderGraph->Begin(frameIndex);
|
|
|
|
auto cmdBuffer = renderGraph->GetCommandBuffer(frameIndex);
|
|
|
|
auto cmdBuffer = renderGraph->GetCommandBuffer(frameIndex);
|
|
|
@ -809,11 +819,11 @@ namespace SHADE
|
|
|
|
tempLibrary.Init(device);
|
|
|
|
tempLibrary.Init(device);
|
|
|
|
tempLibrary.CreateGraphicsPipelines
|
|
|
|
tempLibrary.CreateGraphicsPipelines
|
|
|
|
(
|
|
|
|
(
|
|
|
|
{ shadowMapVS, {} }, shadowMapNode->GetRenderpass(), newSubpass,
|
|
|
|
{ shadowMapVS, shadowMapFS }, shadowMapNode->GetRenderpass(), newSubpass,
|
|
|
|
SHGraphicsPredefinedData::SystemType::BATCHING,
|
|
|
|
SHGraphicsPredefinedData::SystemType::BATCHING,
|
|
|
|
SHGraphicsPredefinedData::GetShadowMapViState(), rasterState
|
|
|
|
SHGraphicsPredefinedData::GetShadowMapViState(), rasterState
|
|
|
|
);
|
|
|
|
);
|
|
|
|
shadowMapPipeline = tempLibrary.GetGraphicsPipeline({ shadowMapVS, {} });
|
|
|
|
shadowMapPipeline = tempLibrary.GetGraphicsPipeline({ shadowMapVS, shadowMapFS });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
newSubpass->SetCompanionSubpass(companionSubpass, shadowMapPipeline); // set companion subpass and pipeline
|
|
|
|
newSubpass->SetCompanionSubpass(companionSubpass, shadowMapPipeline); // set companion subpass and pipeline
|
|
|
|
|
|
|
|
|
|
|
|