Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upThe next phase of shader cleanup #106
Merged
+129
−217
Conversation
|
r=me modulo a couple of uber-nits. |
Share most of the code between rectangular and texture programs by using a texture space transformation which modifies texture coordinates per-vertex. This also allows the elimination of the flipped texture coordinates, further simplifying things. This is a preliminary step to make it easier to implement masking to layer boundaries.
This simplifies things slightly and better encapsulates the shared logic of shaders.
Things seem to function properly without this, but this is more correct.
The z-coordinate is always 0, so we can just make it a constant in the shader. This should result in less data streaming to the GPU when the vertex coordinates change with clipping support.
This can always be inferred from the unit rectangle coordinates, so we simply omit them from the list of attributes passed to the shader.
mrobinson
added a commit
that referenced
this pull request
Sep 10, 2014
The next phase of shader cleanup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
mrobinson commentedSep 6, 2014
In preparation for proper support for "masks to bounds" clean up the shader code. This will make it easier to fiddle with the vertex coordinates.