public void PreRender(PipelineCamera cam) { PreviousDepthData.GetPreviousDepthData getDepthData = new PreviousDepthData.GetPreviousDepthData { currentSize = new Vector2Int(cam.cam.pixelWidth, cam.cam.pixelHeight) }; prevDepthData = IPerCameraData.GetProperty <PreviousDepthData, PreviousDepthData.GetPreviousDepthData>(cam, getDepthData); prevDepthData.targetObject = this; }
public override void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data) { HistoryTexture.GetHistoryTexture getHis = new HistoryTexture.GetHistoryTexture { cam = cam.cam }; texComponent = IPerCameraData.GetProperty <HistoryTexture, HistoryTexture.GetHistoryTexture>(cam, getHis); PreviousDepthData.GetPreviousDepthData getDepthData = new PreviousDepthData.GetPreviousDepthData { currentSize = new Vector2Int(cam.cam.pixelWidth, cam.cam.pixelHeight) }; prevDepthData = IPerCameraData.GetProperty <PreviousDepthData, PreviousDepthData.GetPreviousDepthData>(cam, getDepthData); prevDepthData.targetObject = this; data.buffer.SetGlobalVector(ShaderIDs._LastJitter, texComponent.jitter); cam.cam.ResetProjectionMatrix(); ConfigureJitteredProjectionMatrix(cam.cam, ref texComponent.jitter); data.buffer.SetGlobalVector(ShaderIDs._Jitter, texComponent.jitter); }