You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am following SRP overview tutorial which directs me to this github repo. I don't want to use this project and want to write all the tut code, please tell me which unity template you have used for this? I tried
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering;
public class BasicAssetPipe : RenderPipelineAsset {
public Color clearColour = Color.green;
#if UNITY_EDITOR
[UnityEditor.MenuItem("SRP-Demo/01 - Create Basic Asset Pipeline")]
static void CreateBasicAssetPipeline() {
var instance = ScriptableObject.CreateInstance<BasicAssetPipe>();
UnityEditor.AssetDatabase.CreateAsset(instance, "Assets/1-BasicAssetPipe.asset");
}
#endif
protected override IRenderPipeline InternalCreatePipeline()
{
// throw new System.NotImplementedException();
return new CustomBuildPipeline(clearColour);
}
}
public class CustomBuildPipeline : RenderPipeline
{
private Color m_clearColour = Color.black;
public CustomBuildPipeline(Color c)
{
m_clearColour = c;
}
public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
{
base.Render(renderContext, cameras);
var cmd = new CommandBuffer();
cmd.ClearRenderTarget(true, true, m_clearColour);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Release();
renderContext.Submit();
}
}
above code in template 3D but it didn't do anything?
The text was updated successfully, but these errors were encountered:
MuhammadFaizanKhan
changed the title
which project tempate has used for this project?
which project template has used for this project?
Oct 31, 2018
I am following SRP overview tutorial which directs me to this github repo. I don't want to use this project and want to write all the tut code, please tell me which unity template you have used for this? I tried
above code in template 3D but it didn't do anything?
The text was updated successfully, but these errors were encountered: