-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gl: Avoid using gl_FragCoord for linear gradients.
The 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 either to a window or to an FBO. 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. Fixes 18 testcases.
- Loading branch information
Eric Anholt
committed
Nov 15, 2010
1 parent
7237eb6
commit 31e116f
Showing
3 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters