mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 14:03:17 +02:00
Implemented call to abortTask().
This commit is contained in:
parent
bb04f3f533
commit
3150b963c0
1 changed files with 6 additions and 17 deletions
|
@ -120,11 +120,6 @@ void RenderShadowMap::run(const render::RenderContextPointer& renderContext, con
|
|||
auto lightStage = renderContext->_scene->getStage<LightStage>();
|
||||
assert(lightStage);
|
||||
|
||||
// Exit if current keylight does not cast shadows
|
||||
if (!lightStage->getCurrentKeyLight() || !lightStage->getCurrentKeyLight()->getCastShadows()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto shadow = lightStage->getCurrentKeyShadow();
|
||||
if (!shadow || _cascadeIndex >= shadow->getCascadeCount()) {
|
||||
return;
|
||||
|
@ -305,8 +300,14 @@ void RenderShadowSetup::setSlopeBias(int cascadeIndex, float value) {
|
|||
}
|
||||
|
||||
void RenderShadowSetup::run(const render::RenderContextPointer& renderContext, Outputs& output) {
|
||||
// Abort all jobs if not casting shadows
|
||||
auto lightStage = renderContext->_scene->getStage<LightStage>();
|
||||
assert(lightStage);
|
||||
if (!lightStage->getCurrentKeyLight() || !lightStage->getCurrentKeyLight()->getCastShadows()) {
|
||||
renderContext->taskFlow.abortTask();
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache old render args
|
||||
RenderArgs* args = renderContext->args;
|
||||
|
||||
|
@ -387,18 +388,6 @@ void RenderShadowCascadeSetup::run(const render::RenderContextPointer& renderCon
|
|||
auto lightStage = renderContext->_scene->getStage<LightStage>();
|
||||
assert(lightStage);
|
||||
|
||||
// Exit if current keylight does not cast shadows
|
||||
if (!lightStage->getCurrentKeyLight()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool castShadows = lightStage->getCurrentKeyLight()->getCastShadows();
|
||||
if (!castShadows) {
|
||||
output.edit0() = ItemFilter::Builder::nothing();
|
||||
output.edit1() = ViewFrustumPointer();
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache old render args
|
||||
RenderArgs* args = renderContext->args;
|
||||
|
||||
|
|
Loading…
Reference in a new issue