This repository was archived by the owner on Mar 23, 2019. It is now read-only.
Conversation
5 tasks
mourner
reviewed
Nov 22, 2016
src/circle.vertex.glsl
Outdated
| uniform mat4 u_matrix; | ||
| uniform bool u_scale_with_map; | ||
| uniform vec2 u_extrude_scale; | ||
| uniform float u_devicepixelratio; |
Member
There was a problem hiding this comment.
Why do we use a uniform here instead of DEVICE_PIXEL_RATIO?
Author
There was a problem hiding this comment.
Good catch! I think these lines were introduced by a git merge. I'll remove them now.
lucaswoj
commented
Nov 22, 2016
src/circle.vertex.glsl
Outdated
| #define lowp | ||
| #define mediump | ||
| #define highp | ||
| #endif |
Author
There was a problem hiding this comment.
These lines were also erroneously introduced by a merge ☝️
mourner
reviewed
Nov 28, 2016
src/circle.fragment.glsl
Outdated
| float color_t = stroke_width < 0.01 ? 0.0 : smoothstep( | ||
| -max(blur, v_antialiasblur), | ||
| 0.0, | ||
| length(v_extrude) - radius / (radius + stroke_width) |
Member
There was a problem hiding this comment.
Should we cache -max(blur, v_antialiasblur) and length(v_extrude) so that they're not computed twice?
Author
There was a problem hiding this comment.
Yes! From a little research, that doesn't appear that all GLSL compilers implement common subexpression elimination.
src/circle.fragment.glsl
Outdated
| color * opacity, | ||
| stroke_color * stroke_opacity, | ||
| color_t | ||
| ); |
Member
There was a problem hiding this comment.
I personally find one-line constructs like this easier to read and skim through.
gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);
mourner
approved these changes
Nov 29, 2016
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.