Fix GPU context error during lights rendering

This commit is contained in:
Wojciech Figat
2022-03-28 14:01:51 +02:00
parent e56b280f5b
commit fc138bbbbb

View File

@@ -281,6 +281,8 @@ void LightPass::RenderLight(RenderContext& renderContext, GPUTextureView* lightB
// Set shadow mask
context->BindSR(5, shadowMaskView);
}
else
context->UnBindSR(5);
// Pack light properties buffer
light.SetupLightData(&perLight.Light, view, renderShadow);
@@ -336,6 +338,8 @@ void LightPass::RenderLight(RenderContext& renderContext, GPUTextureView* lightB
// Set shadow mask
context->BindSR(5, shadowMaskView);
}
else
context->UnBindSR(5);
// Pack light properties buffer
light.SetupLightData(&perLight.Light, view, renderShadow);
@@ -377,6 +381,8 @@ void LightPass::RenderLight(RenderContext& renderContext, GPUTextureView* lightB
// Set shadow mask
context->BindSR(5, shadowMaskView);
}
else
context->UnBindSR(5);
// Pack light properties buffer
light.SetupLightData(&perLight.Light, view, renderShadow);