瀏覽代碼

Bugfix: Fixing invalid rendering of non-shadowed lights
- GBuffer and depth textures remained bound as render targets while TiledDeferredLighting compute was attempting to read them

BearishSun 8 年之前
父節點
當前提交
6f23af9b1d
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Source/RenderBeast/BsRenderCompositor.cpp

+ 5 - 0
Source/RenderBeast/BsRenderCompositor.cpp

@@ -321,6 +321,9 @@ namespace bs { namespace ct
 					renderElem->morphVertexDeclaration);
 		}
 
+		// Make sure that any compute shaders are able to read g-buffer by unbinding it
+		rapi.setRenderTarget(nullptr);
+
 		// Trigger post-base-pass callbacks
 		if (sceneCamera != nullptr)
 		{
@@ -438,6 +441,8 @@ namespace bs { namespace ct
 		MSAACoverageStencilMat* stencilMat = MSAACoverageStencilMat::get();
 		rapi.setRenderTarget(sceneDepthNode->depthTex->renderTexture);
 		stencilMat->execute(inputs.view, output->texture);
+
+		rapi.setRenderTarget(nullptr);
 	}
 
 	void RCNodeMSAACoverage::clear()