Use reactive documents for viewport rendering
This commit is contained in:
parent
5a8f8f4565
commit
25744df4a1
4 changed files with 65 additions and 30 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using GameCult.Aetheria.State.Verse;
|
||||
using GameCult.Mesh;
|
||||
using UnityEngine;
|
||||
|
||||
public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour
|
||||
|
|
@ -27,7 +28,7 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour
|
|||
|
||||
private float _nextRefreshTime;
|
||||
private AetheriaRuntimeRtsViewportBounds _viewport;
|
||||
private AetheriaRuntimeRenderSplatsViewportSession _renderSplatsViewport;
|
||||
private CultMeshReactiveDocument<AetheriaRuntimeRenderSplatsViewportDocument> _renderSplatsViewport;
|
||||
|
||||
public RenderTexture TargetTexture
|
||||
{
|
||||
|
|
@ -118,7 +119,7 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour
|
|||
var nextRenderSplatsViewport = ResolveClient()
|
||||
.State
|
||||
.Viewports
|
||||
.ObserveRenderSplats(viewport);
|
||||
.ReactiveRenderSplats(viewport);
|
||||
ClearViewportDocument();
|
||||
_viewport = viewport;
|
||||
_renderSplatsViewport = nextRenderSplatsViewport;
|
||||
|
|
|
|||
Loading…
Reference in a new issue