浏览代码

Rename HDRenderLoop to HDRenderPipeline

/main
sebastienlagarde 8 年前
当前提交
aacfb575
共有 9 个文件被更改,包括 33 次插入24 次删除
  1. 12
      Assets/ScriptableRenderLoop/HDRenderLoop/Editor/HDRenderLoopInspector.cs
  2. 8
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  3. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightLoop.cs
  4. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.cs
  5. 6
      Assets/ScriptableRenderLoop/HDRenderLoop/SceneSettings/CommonSettings.cs
  6. 4
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs
  7. 4
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyParameters.cs
  8. 10
      Assets/ScriptableRenderLoop/HDRenderLoop/Utilities.cs
  9. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs.hlsl.meta

12
Assets/ScriptableRenderLoop/HDRenderLoop/Editor/HDRenderLoopInspector.cs


namespace UnityEngine.Experimental.ScriptableRenderLoop
{
[CustomEditor(typeof(HDRenderLoop))]
[CustomEditor(typeof(HDRenderPipeline))]
public class HDRenderLoopInspector : Editor
{
private class Styles

}
}
private void DebugParametersUI(HDRenderLoop renderLoop)
private void DebugParametersUI(HDRenderPipeline renderLoop)
{
var debugParameters = renderLoop.debugParameters;

EditorGUI.indentLevel--;
}
private void ShadowParametersUI(HDRenderLoop renderLoop)
private void ShadowParametersUI(HDRenderPipeline renderLoop)
{
EditorGUILayout.Space();
var shadowParameters = renderLoop.shadowSettings;

EditorGUI.indentLevel--;
}
private void TextureParametersUI(HDRenderLoop renderLoop)
private void TextureParametersUI(HDRenderPipeline renderLoop)
{
EditorGUILayout.Space();
var textureParameters = renderLoop.textureSettings;

EditorGUI.indentLevel--;
}
private void TilePassUI(HDRenderLoop renderLoop)
private void TilePassUI(HDRenderPipeline renderLoop)
{
EditorGUILayout.Space();

public override void OnInspectorGUI()
{
var renderLoop = target as HDRenderLoop;
var renderLoop = target as HDRenderPipeline;
if (!renderLoop)
return;

8
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


{
public class HDRenderLoopInstance : RenderPipeline
{
private readonly HDRenderLoop m_Owner;
private readonly HDRenderPipeline m_Owner;
public HDRenderLoopInstance(HDRenderLoop owner)
public HDRenderLoopInstance(HDRenderPipeline owner)
{
m_Owner = owner;

[ExecuteInEditMode]
// This HDRenderLoop assume linear lighting. Don't work with gamma.
public class HDRenderLoop : RenderPipelineAsset
public class HDRenderPipeline : RenderPipelineAsset
{
const string k_HDRenderLoopPath = "Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset";

{
var instance = ScriptableObject.CreateInstance<HDRenderLoop>();
var instance = ScriptableObject.CreateInstance<HDRenderPipeline>();
UnityEditor.AssetDatabase.CreateAsset(instance, k_HDRenderLoopPath);
}

2
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightLoop.cs


public virtual void PushGlobalParams(Camera camera, ScriptableRenderContext loop) {}
public virtual void RenderDeferredLighting(HDRenderLoop.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT) {}
public virtual void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT) {}
public virtual void RenderForward(Camera camera, ScriptableRenderContext renderLoop, bool renderOpaque) {}

2
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.cs


}
#endif
public override void RenderDeferredLighting(HDRenderLoop.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT)
public override void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT)
{
var bUseClusteredForDeferred = !usingFptl;

6
Assets/ScriptableRenderLoop/HDRenderLoop/SceneSettings/CommonSettings.cs


void OnEnable()
{
HDRenderLoop renderLoop = Utilities.GetHDRenderLoop();
HDRenderPipeline renderLoop = Utilities.GetHDRenderLoop();
if (renderLoop == null)
{
return;

void OnDisable()
{
HDRenderLoop renderLoop = Utilities.GetHDRenderLoop();
HDRenderPipeline renderLoop = Utilities.GetHDRenderLoop();
if (renderLoop == null)
{
return;

void OnSkyRendererChanged()
{
HDRenderLoop renderLoop = Utilities.GetHDRenderLoop();
HDRenderPipeline renderLoop = Utilities.GetHDRenderLoop();
if (renderLoop == null)
{
return;

4
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs


m_UpdateRequired = true;
}
public void UpdateEnvironment(HDRenderLoop.HDCamera camera, Light sunLight, ScriptableRenderContext renderLoop)
public void UpdateEnvironment(HDRenderPipeline.HDCamera camera, Light sunLight, ScriptableRenderContext renderLoop)
{
{
using (new Utilities.ProfilingSample("Sky Environment Pass", renderLoop))

}
}
public void RenderSky(HDRenderLoop.HDCamera camera, Light sunLight, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ScriptableRenderContext renderLoop)
public void RenderSky(HDRenderPipeline.HDCamera camera, Light sunLight, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ScriptableRenderContext renderLoop)
{
using (new Utilities.ProfilingSample("Sky Pass", renderLoop))
{

4
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyParameters.cs


protected void OnEnable()
{
HDRenderLoop renderLoop = Utilities.GetHDRenderLoop();
HDRenderPipeline renderLoop = Utilities.GetHDRenderLoop();
if (renderLoop == null)
{
return;

protected void OnDisable()
{
HDRenderLoop renderLoop = Utilities.GetHDRenderLoop();
HDRenderPipeline renderLoop = Utilities.GetHDRenderLoop();
if (renderLoop == null)
{
return;

10
Assets/ScriptableRenderLoop/HDRenderLoop/Utilities.cs


return gpuVP;
}
public static HDRenderLoop.HDCamera GetHDCamera(Camera camera)
public static HDRenderPipeline.HDCamera GetHDCamera(Camera camera)
HDRenderLoop.HDCamera hdCamera = new HDRenderLoop.HDCamera();
HDRenderPipeline.HDCamera hdCamera = new HDRenderPipeline.HDCamera();
hdCamera.camera = camera;
hdCamera.screenSize = new Vector4(camera.pixelWidth, camera.pixelHeight, 1.0f / camera.pixelWidth, 1.0f / camera.pixelHeight);

return hdCamera;
}
public static void SetupMaterialHDCamera(HDRenderLoop.HDCamera hdCamera, Material material)
public static void SetupMaterialHDCamera(HDRenderPipeline.HDCamera hdCamera, Material material)
{
material.SetVector("_ScreenSize", hdCamera.screenSize);
material.SetMatrix("_ViewProjMatrix", hdCamera.viewProjectionMatrix);

m.DisableKeyword(keyword);
}
public static HDRenderLoop GetHDRenderLoop()
public static HDRenderPipeline GetHDRenderLoop()
HDRenderLoop renderLoop = UnityEngine.Rendering.GraphicsSettings.renderPipeline as HDRenderLoop;
HDRenderPipeline renderLoop = UnityEngine.Rendering.GraphicsSettings.renderPipeline as HDRenderPipeline;
if (renderLoop == null)
{
Debug.LogWarning("SkyParameters component can only be used with HDRenderLoop custom RenderPipeline.");

9
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs.hlsl.meta


fileFormatVersion: 2
guid: 839dd86bae5fa4d46bf4facd02608862
timeCreated: 1483546512
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存