浏览代码
Added CameraComparer to sort camera array by depth. Moved some functions to LightweightUtils.
/RenderPassXR_Sandbox
Added CameraComparer to sort camera array by depth. Moved some functions to LightweightUtils.
/RenderPassXR_Sandbox
Felipe Lira
7 年前
当前提交
d9c64960
共有 3 个文件被更改,包括 70 次插入 和 35 次删除
-
58ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
-
34ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineUtils.cs
-
13ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineUtils.cs.meta
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.LightweightPipeline |
|||
{ |
|||
public class CameraComparer : IComparer<Camera> |
|||
{ |
|||
public int Compare(Camera lhs, Camera rhs) |
|||
{ |
|||
return (int)(lhs.depth - rhs.depth); |
|||
} |
|||
} |
|||
|
|||
public static class LightweightUtils |
|||
{ |
|||
public static void SetKeyword(CommandBuffer cmd, string keyword, bool enable) |
|||
{ |
|||
if (enable) |
|||
cmd.EnableShaderKeyword(keyword); |
|||
else |
|||
cmd.DisableShaderKeyword(keyword); |
|||
} |
|||
|
|||
public static bool PlatformSupportsMSAABackBuffer() |
|||
{ |
|||
#if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SAMSUNGTV
|
|||
return true; |
|||
#else
|
|||
return false; |
|||
#endif
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1556a6d19597541c8bed4b90c704fb06 |
|||
timeCreated: 1505115136 |
|||
licenseType: Free |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue