# Why are the global sections of structure sheaf of Proj$S$ just the homogenous elements of $S$? [duplicate]

Let $A$ be a ring and define $S = A[x_{0}, x_{1}, \ldots , x_{r}]$. Let $X = \text{Proj }S$. I would like to show that $\Gamma(X, \mathcal{O}_{X}(n)) = S_{n}$. This is Proposition II 5.13 in Hartshorne, but I am not comfortable with the proof given there. I am currently trying to follow the proof here, which is the corrected version of the proof given in Liu's Algebraic Geometry and Arithmetic Curves. The idea seems simple enough. To specify an element of $\Gamma(X, \mathcal{O}_{X}(n))$ is to specify the restrictions, $$f_{i} = \frac{g_{i}}{x_{i}^{d_{i}}} \in S(n)_{(x_{i})} \quad \text{with } \deg(g_{i}) = n + d_{i}$$ We can assume WLOG that $g_{i}$ in the above is not divisible by $x_{i}$. We would like these restrictions to agree on overlaps $D_{+}(x_{i}x_{j})$, that is $$\frac{g_{i}}{x_{i}^{d_{i}}} = \frac{g_{j}}{x_{j}^{d_{j}}}$$ In terms of the equivalence relation defining localization, this gives us that $$g_{i}x_{j}^{d_{j}} - g_{j}x_{i}^{d_{i}} = 0$$ From this I would like to reconstruct a unique element of $S_{n}$. Is someone able to walk me through what is actually going on in the proof above? I'm missing something, and am not sure how we can recover the homogenous polynomial that he does. Even if I could just see this done for the case of $S = A[x_{1}, x_{2}]$ would be enough.