-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code error in chapter 9 linestrip #63
Comments
If you change the three 4. into 4.1 4.2 and 4.3 it works? |
I figure out what happened. In the fragment shader, we are using v_uv.x to decide which points are cap. It would be wrong if the end of point is 'before' it's previous point or 'before' the first point. But I still no idea how to fix it. |
where is this test exactly? |
The whole code is bellow:
It works fine when the P is [[4, 1], [4, 12], [4, 24]], but shows nothing when P is [[4, 1], [4, 12], [4, 6]] |
|
It seems to draw nothing if points at [[10., 4.], [20., 4.], [15., 4.]]
The code is in below.
I guess it happened when points previous, current, next are collinear and the next point's x or y less than current point.
Another case: The drawing of points [[453, 138], [647, 137], [453, 139]] is weird. And points [[453, 138], [647, 137], [453, 138]] draw nothing.
The text was updated successfully, but these errors were encountered: