Conversation
|
|
||
| sizeSlider.oninput = function () { | ||
| updateMap(); | ||
| document.getElementById("sizeOut").innerHTML = `size: ${document.getElementById("size").value}`; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
|
|
||
| haloWidthSlider.oninput = function () { | ||
| updateMap(); | ||
| document.getElementById("haloWidthOut").innerHTML = `halo: ${document.getElementById("haloWidth").value}`; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
|
|
||
| sizeSlider.oninput = function () { | ||
| updateMap(); | ||
| document.getElementById("sizeOut").innerHTML = `size: ${document.getElementById("size").value}`; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
|
|
||
| haloWidthSlider.oninput = function () { | ||
| updateMap(); | ||
| document.getElementById("haloWidthOut").innerHTML = `halo: ${document.getElementById("haloWidth").value}`; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
|
|
||
| weightSlider.oninput = function () { | ||
| updateMap(); | ||
| document.getElementById("weightOut").innerHTML = `weight: ${document.getElementById("weight").value}`; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
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.
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.
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: