|
|
|
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.Rendering; |
|
|
|
using UnityEngine.Experimental.Rendering; |
|
|
|
using UnityEngine.ScriptableRenderPipeline; |
|
|
|
//using UnityEngine.ScriptableRenderPipeline;
|
|
|
|
|
|
|
|
// Very basic scriptable rendering loop example:
|
|
|
|
// - Use with BasicRenderLoopShader.shader (the loop expects "BasicPass" pass type to exist)
|
|
|
|
|
|
|
var settings = new DrawRendererSettings(cull, camera, new ShaderPassName("BasicPass")); |
|
|
|
settings.sorting.flags = SortFlags.CommonOpaque; |
|
|
|
settings.inputFilter.SetQueuesOpaque(); |
|
|
|
context.DrawRenderers(ref settings); |
|
|
|
// context.DrawRenderers(ref settings);
|
|
|
|
|
|
|
|
// Draw skybox
|
|
|
|
context.DrawSkybox(camera); |
|
|
|
|
|
|
settings.inputFilter.SetQueuesTransparent(); |
|
|
|
context.DrawRenderers(ref settings); |
|
|
|
// context.DrawRenderers(ref settings);
|
|
|
|
|
|
|
|
context.Submit(); |
|
|
|
} |
|
|
|