Browse Source

Quads that don't read the viewport should not begin the pingpong chain. Fixes #167.

Lasse Öörni 12 năm trước cách đây
mục cha
commit
0610520768
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Source/Engine/Graphics/View.cpp

+ 2 - 2
Source/Engine/Graphics/View.cpp

@@ -1657,9 +1657,9 @@ bool View::CheckViewportWrite(const RenderPathCommand& command)
 
 
 bool View::CheckPingpong(unsigned index)
 bool View::CheckPingpong(unsigned index)
 {
 {
-    // Current command must be a viewport-writing quad to begin the pingpong chain
+    // Current command must be a viewport-reading & writing quad to begin the pingpong chain
     RenderPathCommand& current = renderPath_->commands_[index];
     RenderPathCommand& current = renderPath_->commands_[index];
-    if (current.type_ != CMD_QUAD || !CheckViewportWrite(current))
+    if (current.type_ != CMD_QUAD || !CheckViewportRead(current) || !CheckViewportWrite(current))
         return false;
         return false;
 
 
     // If there are commands other than quads that target the viewport, we must keep rendering to the final target and resolving
     // If there are commands other than quads that target the viewport, we must keep rendering to the final target and resolving