Repository navigation
reduce factor by which we are scaling texture coordinates - #4770
Merged
Merged
Conversation
kkaefer
reviewed
May 31, 2017
| gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1); | ||
| // we are using Int16 for texture position coordinates to give us enough precision for | ||
| // fractional coordinates. we use 8192 to scale the texture coordinates in the buffer | ||
| // as an arbitrarily high number to preserve adequare precision when rendering |
| // fractional coordinates. we use 8192 to scale the texture coordinates in the buffer | ||
| // as an arbitrarily high number to preserve adequare precision when rendering | ||
| // this is also the same value as the EXTENT we are using for our tile buffer pos coordinates, | ||
| // so math for modifying either is consistent. |
Member
There was a problem hiding this comment.
Nit: Can we please have some capitalization and periods ;)
kkaefer
approved these changes
Jun 1, 2017
mollymerp
force-pushed
the
texture-pos-scaling
branch
from
June 8, 2017 17:18
f325451 to
d5023c4
Compare
5 tasks
mollymerp
force-pushed
the
texture-pos-scaling
branch
2 times, most recently
from
July 11, 2017 19:11
f3008e9 to
8ce5400
Compare
…fer to 8192 to match EXTENT grammar 🚓 fix lint errors after rebase fix temp collisionBoxArray
mollymerp
force-pushed
the
texture-pos-scaling
branch
from
July 24, 2017 23:41
8ce5400 to
26fd553
Compare
This file contains hidden or 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
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reduce factor by which we are scaling texture coordinates in the buffer to 8192 to match
EXTENTper chat w @kkaefer – he arbitrarily chose 32767 to scale texture coordinates back in 2013 and we don't really need that much precision. this makes some of the math we need to do for terrain rendering a lot easier and doesn't cause any rendering degradation ✌️
I'll put up the corresponding native PR ASAP.
Launch Checklist