public void Render(ref ScriptableRenderContext context, GODRPParameters p) { if (commandBuffer == null) { commandBuffer = new CommandBuffer(); } p.cb = commandBuffer; foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } context.ExecuteCommandBuffer(p.cb); p.cb.Clear(); }
protected override void Render(ScriptableRenderContext context, Camera[] cameras) { if (RenderTreeRoot == null) { RenderTreeRoot = GameObject.Find("RenderTreeRoot"); if (RenderTreeRoot == null) { return; } } if (cameras.Length == 0) { return; } GODRPParameters parameters = new GODRPParameters() { cameras = cameras, camera = cameras[0], currentCameraIndex = 0 }; context.SetupCameraProperties(parameters.camera); RenderTreeRoot.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, parameters); } } }
public void Render(ref ScriptableRenderContext context, GODRPParameters p) { foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } }
public void Render(ref ScriptableRenderContext context, GODRPParameters p) { context.DrawRenderers(p.cullingResults, ref p.drawingSettings, ref p.filteringSettings); foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } }
public void Render(ref ScriptableRenderContext context, GODRPParameters p) { ScriptableCullingParameters cullingParam = new ScriptableCullingParameters(); p.camera.TryGetCullingParameters(out cullingParam); p.cullingResults = context.Cull(ref cullingParam); foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } }
public void Render(ref ScriptableRenderContext context, GODRPParameters p) { p.filteringSettings = new FilteringSettings(RenderQueueRange.opaque, -1); p.sortingSettings = new SortingSettings(p.camera) { criteria = SortingCriteria.CommonOpaque }; p.drawingSettings = new DrawingSettings(new ShaderTagId(lightMode), p.sortingSettings); foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } }
public void Render(ref ScriptableRenderContext context, GODRPParameters p) { for (int k = 0; k < p.cameras.Length; k++) { p.camera = p.cameras[k]; p.currentCameraIndex = k; context.SetupCameraProperties(p.camera); foreach (Transform child in transform) { if (!child.gameObject.activeInHierarchy) { continue; } child.GetComponents(components); for (int i = 0; i < components.Count; i++) { if (components[i] is IRenderTreeItem renderTreeItem) { renderTreeItem.Render(ref context, p); } } } } }