fix frustum culling for portals
This commit is contained in:
@@ -81,8 +81,12 @@ namespace EscapeRoomEngine.Portal.Runtime
|
||||
context.ExecuteCommandBuffer(_commandBuffer);
|
||||
_commandBuffer.Clear();
|
||||
|
||||
// frustum culling
|
||||
camera.TryGetCullingParameters(true, out var cullingParameters);
|
||||
var cullingResults = context.Cull(ref cullingParameters);
|
||||
|
||||
// render the portal
|
||||
context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filteringSettings, ref _renderStateBlock);
|
||||
context.DrawRenderers(cullingResults, ref drawingSettings, ref filteringSettings, ref _renderStateBlock);
|
||||
|
||||
// reset
|
||||
RenderingUtils.SetViewAndProjectionMatrices(_commandBuffer, cameraData.GetViewMatrix(), cameraData.GetGPUProjectionMatrix(), false);
|
||||
|
||||
Reference in New Issue
Block a user