internal void UpdateConstants(ref DeviceContext context) { var cb = Constants; CFrame.GetViewMatrix(out cb.Data.ViewMatrix); Matrix.Multiply(ref cb.Data.ViewMatrix, ref _projectionMatrix, out _viewProjectionMatrix); cb.Data.ViewProjectionMatrix = _viewProjectionMatrix; Matrix.Invert(ref cb.Data.ViewProjectionMatrix, out cb.Data.InverseViewProjection); cb.Data.Position = CFrame.p; Constants.Update(ref context); }