public override void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data) { reflectProbes = proper.cullResults.visibleReflectionProbes; reflectionData = new NativeArray <ReflectionData>(reflectProbes.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory); storeRef = new StoreReflectionData { data = reflectionData.Ptr(), allProbes = reflectProbes.Ptr(), count = reflectProbes.Length, camPos = cam.cam.transform.position, dist = availiableDistance, localToWorldMat = MUnsafeUtility.Malloc <Matrix4x4>(sizeof(Matrix4x4) * reflectProbes.Length, Allocator.Temp) }; storeDataHandler = storeRef.ScheduleRefBurst(); if (ssrEvents.enabled && !RenderPipeline.renderingEditor) { ssrEvents.PreRender(cam); } if (!preintDefaultRT) { preintDefaultRT = new RenderTexture(512, 512, 0, RenderTextureFormat.RG16, RenderTextureReadWrite.Linear); preintDefaultRT.filterMode = FilterMode.Bilinear; preintDefaultRT.Create(); data.buffer.BlitSRT(preintDefaultRT, preintMat, 0); } }
public override void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data) { reflectProbes = proper.cullResults.visibleReflectionProbes; reflectionData = new NativeArray <ReflectionData>(Mathf.Min(maximumProbe, reflectProbes.Length), Allocator.Temp, NativeArrayOptions.UninitializedMemory); storeRef = new StoreReflectionData { data = reflectionData.Ptr(), allProbes = reflectProbes.Ptr(), count = 0, camPos = cam.cam.transform.position, dist = availiableDistance, maximumProbe = maximumProbe }; storeDataHandler = storeRef.ScheduleRefBurst(reflectProbes.Length, 32); if (ssrEvents.enabled && !RenderPipeline.renderingEditor) { ssrEvents.PreRender(cam); } }
public override void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data) { reflectProbes = proper.cullResults.visibleReflectionProbes; reflectionData = new NativeArray <ReflectionData>(reflectProbes.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory); storeRef = new StoreReflectionData { data = reflectionData.Ptr(), allProbes = reflectProbes.Ptr(), count = reflectProbes.Length, camPos = cam.cam.transform.position, dist = availiableDistance, localToWorldMat = MUnsafeUtility.Malloc <Matrix4x4>(sizeof(Matrix4x4) * reflectProbes.Length, Allocator.Temp) }; storeDataHandler = storeRef.ScheduleRefBurst(); if (ssrEvents.enabled && !RenderPipeline.renderingEditor) { ssrEvents.PreRender(cam); } }