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) { texComponent = IPerCameraData.GetProperty(cam, (c) => new HistoryTexture(c.cam)); prevDepthData = IPerCameraData.GetProperty(cam, (cc) => new PreviousDepthData(new Vector2Int(cc.cam.pixelWidth, cc.cam.pixelHeight))); 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); }
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); }
public void PreRender(PipelineCamera cam) { prevDepthData = IPerCameraData.GetProperty(cam, (cc) => new PreviousDepthData(new Vector2Int(cc.cam.pixelWidth, cc.cam.pixelHeight))); prevDepthData.targetObject = this; }