don't crash when refraction pass is empty
This commit is contained in:
committed by
Mathias Agopian
parent
7f2a189641
commit
90ee59512b
@@ -280,6 +280,7 @@ public:
|
||||
|
||||
Command const* begin() const noexcept { return mCommandBegin; }
|
||||
Command const* end() const noexcept { return mCommandEnd; }
|
||||
bool empty() const noexcept { return begin() == end(); }
|
||||
|
||||
// This is the main function of this class, this appends commands to the pass using
|
||||
// the current camera, geometry and flags set. This can be called multiple times if needed.
|
||||
|
||||
@@ -497,7 +497,7 @@ void FRenderer::renderJob(ArenaScope& arena, FView& view) {
|
||||
|
||||
// the color pass + refraction + color-grading as subpass if needed
|
||||
// this cancels the colorPass() call above if refraction is active.
|
||||
if (view.isScreenSpaceRefractionEnabled()) {
|
||||
if (view.isScreenSpaceRefractionEnabled() && !pass.empty()) {
|
||||
colorPassOutput = refractionPass(fg, config, colorGradingConfigForColor, pass, view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user