Frédéric Vauchelles
7 年前
当前提交
e97721e9
共有 10 个文件被更改,包括 249 次插入 和 72 次删除
-
25ScriptableRenderPipeline/Core/CoreRP/Textures/RTHandleSystem.cs
-
14ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDAdditionalCameraData.cs
-
64ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDCustomSamplerId.cs
-
49ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
-
80ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/BufferPyramid.cs
-
53ScriptableRenderPipeline/Core/CoreRP/Textures/BufferedRTHandleSystem.cs
-
11ScriptableRenderPipeline/Core/CoreRP/Textures/BufferedRTHandleSystem.cs.meta
-
10ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCameraFrameHistoryType.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCameraFrameHistoryType.cs.meta
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEngine.Assertions; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class BufferedRTHandleSystem : IDisposable |
|||
{ |
|||
Dictionary<int, RTHandleSystem.RTHandle[]> m_RTHandles = new Dictionary<int, RTHandleSystem.RTHandle[]>(); |
|||
|
|||
RTHandleSystem m_RTHandleSystem = new RTHandleSystem(); |
|||
bool m_DisposedValue = false; |
|||
|
|||
public RTHandleSystem.RTHandle GetFrameRT(int id, int index) |
|||
{ |
|||
if (!m_RTHandles.ContainsKey(id)) |
|||
return null; |
|||
|
|||
Assert.IsTrue(index >= 0 && index < m_RTHandles[id].Length); |
|||
|
|||
return m_RTHandles[id][index]; |
|||
} |
|||
|
|||
public void AllocBuffer( |
|||
int id, |
|||
Func<RTHandleSystem, RTHandleSystem.RTHandle> allocator, |
|||
int bufferSize |
|||
) |
|||
{ |
|||
m_RTHandles.Add(id, new RTHandleSystem.RTHandle[bufferSize]); |
|||
} |
|||
|
|||
void Dispose(bool disposing) |
|||
{ |
|||
if (!m_DisposedValue) |
|||
{ |
|||
if (disposing) |
|||
{ |
|||
m_RTHandleSystem.Dispose(); |
|||
m_RTHandleSystem = null; |
|||
} |
|||
|
|||
m_DisposedValue = true; |
|||
} |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
Dispose(true); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: cc56f4b85f1be9749add0bb4a25a4e4b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public enum HDCameraFrameHistoryType |
|||
{ |
|||
DepthPyramid, |
|||
ColorPyramid |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1f3be30cb97279146bc83ceb83fff369 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue