summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Components/UnitPreprocessing.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-30 18:15:25 +0800
committerchai <chaifix@163.com>2021-09-30 18:15:25 +0800
commit5b19af7f51ad4504fc426b8387442f6b868b5f61 (patch)
treea90e5829c6d87386cf552ade49609597e93ce8df /Assets/Scripts/Unit/Components/UnitPreprocessing.cs
parent76745de7a04e46d18319c734067fa49641370014 (diff)
*misc
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitPreprocessing.cs')
-rw-r--r--Assets/Scripts/Unit/Components/UnitPreprocessing.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitPreprocessing.cs b/Assets/Scripts/Unit/Components/UnitPreprocessing.cs
index 30357615..44ab73b7 100644
--- a/Assets/Scripts/Unit/Components/UnitPreprocessing.cs
+++ b/Assets/Scripts/Unit/Components/UnitPreprocessing.cs
@@ -15,12 +15,15 @@ public class UnitPreprocessing : UnitComponent
WorldNormalTexture, // Unit World Normal Texture
}
- public EUnitPreprocessing preprocessing;
-
- public RenderTexture unitDepthTexture { get; private set; }
- public RenderTexture unitWorldNormalTexture { get; private set; }
-
- private CommandBuffer m_CBBeforeDepthTexture;
+ public EUnitPreprocessing preprocessing;
+
+ #region render textures
+ public RenderTexture unitDepthTexture { get; private set; }
+ public RenderTexture unitWorldNormalTexture { get; private set; }
+ public RenderTexture unitMotionVectorTexture { get; private set; }
+ #endregion
+
+ private CommandBuffer m_CBBeforeDepthTexture;
private Material m_MaterialDepth;
@@ -72,11 +75,11 @@ public class UnitPreprocessing : UnitComponent
private void OnWillRenderUnit()
{
- RenderDepthTexture();
- //RenderWorldNormal();
-
- MainCamera.Instance.camera.AddCommandBuffer(CameraEvent.BeforeDepthTexture, m_CBBeforeDepthTexture);
- }
+ RenderDepthTexture();
+ //RenderWorldNormal();
+ RenderMotionVector();
+ MainCamera.Instance.camera.AddCommandBuffer(CameraEvent.BeforeDepthTexture, m_CBBeforeDepthTexture);
+ }
void RenderDepthTexture()
{
@@ -99,6 +102,10 @@ public class UnitPreprocessing : UnitComponent
}
}
+ void RenderMotionVector()
+ {
+ }
+
//void RenderWorldNormal()
//{
// var cb = m_CBBeforeDepthTexture;