sebastienlagarde 8 年前
当前提交
f423dd68
共有 5 个文件被更改,包括 37 次插入6 次删除
  1. 2
      Assets/ScriptableRenderLoop/ForwardRenderLoop/ForwardRenderLoop.cs
  2. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  3. 1
      Assets/ScriptableRenderLoop/ScriptableRenderLoop.cs
  4. 32
      Assets/ScriptableRenderLoop/ScriptableRenderLoopPicker.cs
  5. 6
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

2
Assets/ScriptableRenderLoop/ForwardRenderLoop/ForwardRenderLoop.cs


Rebuild ();
}
void Rebuild()
public override void Rebuild()
{
m_ShadowPass = new ShadowRenderPass (m_ShadowSettings);
}

2
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


s_punctualLightList.Release();
}
void Rebuild()
public override void Rebuild()
{
ClearComputeBuffers();

1
Assets/ScriptableRenderLoop/ScriptableRenderLoop.cs


public abstract class ScriptableRenderLoop : ScriptableObject
{
public abstract void Render(Camera[] cameras, RenderLoop renderLoop);
public virtual void Rebuild() { }
#if UNITY_EDITOR
public virtual UnityEditor.SupportedRenderingFeatures GetSupportedRenderingFeatures() { return new UnityEditor.SupportedRenderingFeatures(); }

32
Assets/ScriptableRenderLoop/ScriptableRenderLoopPicker.cs


if (m_RenderLoop == null)
return false;
#if UNITY_EDITOR
if (m_AssetVersion != ms_GlobalAssetVersion)
{
m_AssetVersion = ms_GlobalAssetVersion;
m_RenderLoop.Rebuild();
}
#endif
}
}
#if UNITY_EDITOR
// Temporary hack to allow compute shader reloading
internal class AssetReloader : UnityEditor.AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
foreach (string str in importedAssets)
{
if (str.EndsWith(".compute"))
{
ms_GlobalAssetVersion++;
break;
}
}
}
}
public static int ms_GlobalAssetVersion = 0;
public int m_AssetVersion = 0;
#endif
}
}

6
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


}
void Rebuild()
public override void Rebuild()
{
ClearComputeBuffers();

m_blitMaterial = new Material(m_FinalPassShader);
m_blitMaterial.hideFlags = HideFlags.HideAndDontSave;
lightList = null;
}
void OnDisable()

void ResizeIfNecessary(int curWidth, int curHeight)
{
if(curWidth!=m_WidthOnRecord || curHeight!=m_HeightOnRecord)
if(curWidth!=m_WidthOnRecord || curHeight!=m_HeightOnRecord || lightList == null)
{
if(m_WidthOnRecord>0 && m_HeightOnRecord>0)
ReleaseResolutionDependentBuffers();

正在加载...
取消
保存