mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add 'advanced' post-effect load configuration
This commit is contained in:
parent
9cc59c8848
commit
02a91e0b72
10 changed files with 49 additions and 21 deletions
|
|
@ -97,6 +97,7 @@ void PostProcessing::configureEffect(
|
|||
) {
|
||||
const auto& viewport = context.getViewport();
|
||||
|
||||
bool ssaoConfigured = false;
|
||||
if (!ssaoConfigured) {
|
||||
for (unsigned int i = 0; i < 64; ++i) {
|
||||
auto name = "u_ssaoSamples["+ std::to_string(i) + "]";
|
||||
|
|
@ -129,7 +130,9 @@ void PostProcessing::render(
|
|||
}
|
||||
int totalPasses = 0;
|
||||
for (const auto& effect : effectSlots) {
|
||||
totalPasses += (effect != nullptr && effect->isActive());
|
||||
totalPasses +=
|
||||
(effect != nullptr && effect->isActive() &&
|
||||
!(effect->isAdvanced() && gbuffer == nullptr));
|
||||
}
|
||||
|
||||
const auto& vp = context.getViewport();
|
||||
|
|
@ -163,6 +166,9 @@ void PostProcessing::render(
|
|||
if (effect == nullptr || !effect->isActive()) {
|
||||
continue;
|
||||
}
|
||||
if (effect->isAdvanced() && gbuffer == nullptr) {
|
||||
continue;
|
||||
}
|
||||
auto& shader = effect->use();
|
||||
configureEffect(context, shader, timer, camera, shadowMap);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue