-
Notifications
You must be signed in to change notification settings - Fork 1
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
Double MSDF #5
base: main
Are you sure you want to change the base?
Double MSDF #5
Conversation
379ecef
to
80e83db
Compare
float size = v_data1.y; | ||
float fade_opacity = v_data1[2]; | ||
|
||
fragColor = u_is_text || !u_is_msdf ? renderText(u_is_text, fill_color, halo_color, opacity, halo_width, halo_blur, EDGE_GAMMA, tex, gamma_scale, size, fade_opacity) : renderMSDFIcon(fill_color, halo_color, opacity, EDGE_GAMMA, tex, gamma_scale, size, fade_opacity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expressed concern about this branching logic in our 1:1, but I think since the input to the branch is a uniform the execution only ever has to follow one path and there ends up not being any efficiency hit.
|
||
float EDGE_GAMMA = 0.105 / u_device_pixel_ratio; | ||
float screenPxRange(float fontScale) { | ||
// WebGL1 doesn't support derivatives and we can't use version 300 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is a little confusing because it doesn't say why we'd want to support derivatives? i.e. what the preferred code would be and why it would be better
This implements VIZ-1182
I've added changes by commits:
Test plan: