summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-11-15gl: Avoid using gl_FragCoord for linear gradients.HEADmasterEric Anholt3-27/+45
My, but that was a broken way of doing things. The major issue is that we store our data flipped based on whether we're rendering to an FBO or to a window. By not flipping our gl_FragCoord usage based on that (either with math or ARB_frag_coord_conventions), this caused linear gradients to be flipped when rendering to a window. To avoid this, pass in appropriate texcoords. And, if we're passing in texcoords, just do the projection to the linear gradient factor on the CPU side per vertex instead of providing a bunch of uniforms to do the math per fragment.