浏览代码

Fix minor warnings

/2018.1
Tim Cooper 6 年前
当前提交
da540b9e
共有 3 个文件被更改,包括 5 次插入7 次删除
  1. 3
      ScriptableRenderPipeline/Core/CoreRP/Shadow/Shadow.cs
  2. 7
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs
  3. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMeta.hlsl

3
ScriptableRenderPipeline/Core/CoreRP/Shadow/Shadow.cs


}
// read
float texelSizeX = 1.0f, texelSizeY = 1.0f;
CachedEntry ce = m_EntryCache[ceIdx];
ce.zclip = sr.shadowType != GPUShadowType.Directional;

if( ce.current.splitData.cullingSphere.w != float.NegativeInfinity )
{
int face = (int)key.faceIdx;
texelSizeX = 2.0f / ce.current.proj.m00;
texelSizeY = 2.0f / ce.current.proj.m11;
m_TmpBorders[face] = cascadeBorders[face];
m_TmpSplits[key.faceIdx].w *= ce.current.splitData.cullingSphere.w;
}

7
ScriptableRenderPipeline/LightweightPipeline/LWRP/Data/LightweightPipelineAsset.cs


{
private const int PACKAGE_MANAGER_PATH_INDEX = 1;
private Shader m_DefaultShader;
public static readonly string[] m_SearchPaths = {"Assets", "Packages/com.unity.render-pipelines.lightweight"};
public static readonly string m_SearchPathProject = "Assets";
public static readonly string m_SearchPathPackage = "Packages/com.unity.render-pipelines.lightweight";
// Default values set when a new LightweightPipeline asset is created
[SerializeField] private int kAssetVersion = 2;

private static T LoadResourceFile<T>() where T : ScriptableObject
{
T resourceAsset = null;
var guids = AssetDatabase.FindAssets(typeof(T).Name + " t:scriptableobject", m_SearchPaths);
var guids = AssetDatabase.FindAssets(typeof(T).Name + " t:scriptableobject", new []{m_SearchPathProject});
foreach (string guid in guids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);

// There's currently an issue that prevents FindAssets from find resources withing the package folder.
if (resourceAsset == null)
{
string path = m_SearchPaths[PACKAGE_MANAGER_PATH_INDEX] + "/LWRP/Data/" + typeof(T).Name + ".asset";
string path = m_SearchPathPackage + "/LWRP/Data/" + typeof(T).Name + ".asset";
resourceAsset = AssetDatabase.LoadAssetAtPath<T>(path);
}
return resourceAsset;

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMeta.hlsl


unity_OneOverOutputBoost = saturate(unity_OneOverOutputBoost);
// Apply Albedo Boost from LightmapSettings.
res.rgb = clamp(pow(res.rgb, unity_OneOverOutputBoost), 0, unity_MaxOutputValue);
res.rgb = clamp(PositivePow(res.rgb, unity_OneOverOutputBoost), 0, unity_MaxOutputValue);
}
if (unity_MetaFragmentControl.y)
{

正在加载...
取消
保存