public RenderPipeline(PipelineResources resources) { eventsGuideBook = new NativeDictionary <UIntPtr, int, PtrEqual>(resources.availiableEvents.Length, Allocator.Persistent, new PtrEqual()); resources.SetRenderingPath(); var allEvents = resources.allEvents; GraphicsUtility.UpdatePlatform(); MLight.ClearLightDict(); this.resources = resources; current = this; data.buffer = new CommandBuffer(); for (int i = 0; i < resources.availiableEvents.Length; ++i) { resources.availiableEvents[i].InitDependEventsList(); } for (int i = 0; i < resources.availiableEvents.Length; ++i) { eventsGuideBook.Add(new UIntPtr(MUnsafeUtility.GetManagedPtr(resources.availiableEvents[i].GetType())), i); resources.availiableEvents[i].Prepare(); } for (int i = 0; i < resources.availiableEvents.Length; ++i) { resources.availiableEvents[i].InitEvent(resources); } waitReleaseRT = new NativeList <int>(20, Allocator.Persistent); }
public RenderPipeline(PipelineResources resources) { resources.SetRenderingPath(); var allEvents = resources.allEvents; GraphicsUtility.UpdatePlatform(); MLight.ClearLightDict(); this.resources = resources; current = this; data.buffer = new CommandBuffer(); data.frustumPlanes = new Vector4[6]; for (int i = 0; i < allEvents.Length; ++i) { PipelineEvent[] events = allEvents[i]; if (events == null) { continue; } foreach (var j in events) { j.Prepare((PipelineResources.CameraRenderingPath)i); } foreach (var j in events) { j.InitEvent(resources); } } }
public RenderPipeline(PipelineResources resources) { MLight.ClearLightDict(); this.resources = resources; current = this; data.buffer = new CommandBuffer(); data.frustumPlanes = new Vector4[6]; gpurpEvents = GetAllEvents(resources.gpurpEvents); foreach (var i in gpurpEvents) { i.InitEvent(resources); } }
public RenderPipeline(GameObject pipelinePrefab, PipelineResources resources) { allDrawEvents.Clear(); MLight.ClearLightDict(); this.pipelinePrefab = pipelinePrefab; this.resources = resources; current = this; data.buffer = new CommandBuffer(); data.frustumPlanes = new Vector4[6]; allEvents = pipelinePrefab.GetComponentsInChildren <PipelineEvent>(); foreach (var i in allEvents) { i.InitEvent(resources); } }
public RenderPipeline(PipelineResources resources) { resources.SetRenderingPath(); var allEvents = resources.allEvents; GraphicsUtility.UpdatePlatform(); MLight.ClearLightDict(); this.resources = resources; current = this; data.buffer = new CommandBuffer(); data.frustumPlanes = new Vector4[6]; for (int i = 0; i < resources.availiableEvents.Length; ++i) { resources.availiableEvents[i].Prepare(); } for (int i = 0; i < resources.availiableEvents.Length; ++i) { resources.availiableEvents[i].InitEvent(resources); } }