浏览代码

HDRenderPipeline: TilePass now use RenderPipelineResources from HDRenderPipeline

/RenderPassXR_Sandbox
sebastienlagarde 8 年前
当前提交
72362297
共有 8 个文件被更改,包括 21 次插入20 次删除
  1. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  2. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
  3. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset.meta
  4. 11
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs
  5. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoopProducer.cs
  6. 16
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TileLightLoopProducer.cs
  7. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
  8. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


m_LitRenderLoop.Build();
if (asset.lightLoopProducer)
m_LightLoop = asset.lightLoopProducer.CreateLightLoop();
m_LightLoop = asset.lightLoopProducer.CreateLightLoop(asset.renderPipelineResources);
if (m_LightLoop != null)
m_LightLoop.Build(asset.textureSettings);

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset


m_EditorClassIdentifier:
m_LightLoopProducer: {fileID: 11400000, guid: bf8cd9ae03ff7d54c89603e67be0bfc5,
type: 2}
m_RenderPipelineResources: {fileID: 11400000, guid: 42086e81f4f0c724f96f7f09cc995354,
type: 2}
renderingSettings:
useForwardRenderingOnly: 0
useDepthPrepass: 0

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset.meta


fileFormatVersion: 2
guid: fa7ff29edd844404fb648e3eb1134f14
timeCreated: 1496140270
timeCreated: 1496140696
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000

11
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs


{
var instance = CreateInstance<HDRenderPipelineAsset>();
AssetDatabase.CreateAsset(instance, k_HDRenderPipelinePath);
// If it exist, load renderPipelineResources
instance.renderPipelineResources = AssetDatabase.LoadAssetAtPath<RenderPipelineResources>(RenderPipelineResources.renderPipelineResourcesPath);
}
[UnityEditor.MenuItem("HDRenderPipeline/Add \"Additional Light Data\" (if not present)")]

{
get { return m_LightLoopProducer; }
set { m_LightLoopProducer = value; }
}
[SerializeField]
private RenderPipelineResources m_RenderPipelineResources;
public RenderPipelineResources renderPipelineResources
{
get { return m_RenderPipelineResources; }
set { m_RenderPipelineResources = value; }
}
// NOTE:

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoopProducer.cs


{
public abstract class LightLoopProducer : ScriptableObject
{
public abstract BaseLightLoop CreateLightLoop();
public abstract BaseLightLoop CreateLightLoop(RenderPipelineResources renderPipelineResources);
}
}

16
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TileLightLoopProducer.cs


{
var instance = CreateInstance<TileLightLoopProducer>();
UnityEditor.AssetDatabase.CreateAsset(instance, TilePassProducer);
instance.m_PassResources = AssetDatabase.LoadAssetAtPath<RenderPipelineResources>(RenderPipelineResources.renderPipelineResourcesPath);
}
#endif

set { m_TileSettings = value; }
}
[SerializeField]
private RenderPipelineResources m_PassResources;
public RenderPipelineResources passResources
public override BaseLightLoop CreateLightLoop(RenderPipelineResources renderPipelineResources)
get { return m_PassResources; }
set { m_PassResources = value; }
}
public override BaseLightLoop CreateLightLoop()
{
return new LightLoop(this);
return new LightLoop(this, renderPipelineResources);
}
}
}

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs


TileLightLoopProducer.TileSettings m_PassSettings;
private RenderPipelineResources m_PassResources;
public LightLoop(TileLightLoopProducer producer)
public LightLoop(TileLightLoopProducer producer, RenderPipelineResources renderPipelineResources)
m_PassResources = producer.passResources;
m_PassResources = renderPipelineResources;
}
public override void Build(TextureSettings textureSettings)

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs


public const string buildPerVoxelLightListShaderPath = "Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild-clustered.compute";
public const string shadeOpaqueShaderPath = "Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/shadeopaque.compute";
[UnityEditor.MenuItem("HDRenderPipeline/CreateRenderPipelineResources")]
[UnityEditor.MenuItem("RenderPipeline/HDRenderPipeline/Create Resources Asset")]
static void CreateRenderPipelineResources()
{
var instance = CreateInstance<RenderPipelineResources>();

正在加载...
取消
保存