Skip to content

Commit

Permalink
Update WR, and copy new shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
gw3583 committed Oct 20, 2016
1 parent 6c28d44 commit 8589702
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
25 changes: 15 additions & 10 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions resources/shaders/ps_border.fs.glsl
Expand Up @@ -28,7 +28,7 @@ float alpha_for_solid_border(float distance_from_ref,
inner_radius += nudge;
outer_radius -= nudge;

if ((distance_from_ref < outer_radius && distance_from_ref > inner_radius)) {
if (distance_from_ref < outer_radius && distance_from_ref > inner_radius) {
return 1.0;
}

Expand All @@ -39,7 +39,7 @@ float alpha_for_solid_border(float distance_from_ref,
distance_from_border /= pixels_per_fragment;

// Apply a more gradual fade out to transparent.
distance_from_border -= 0.5;
// distance_from_border -= 0.5;

return smoothstep(1.0, 0.0, distance_from_border);
}
Expand Down
4 changes: 2 additions & 2 deletions resources/shaders/ps_image_clip.fs.glsl
Expand Up @@ -11,8 +11,8 @@ void main(void) {

// We clamp the texture coordinate calculation here to the local rectangle boundaries,
// which makes the edge of the texture stretch instead of repeat.
vec2 pos_for_texture =
clamp(pos, vLocalRect.xy, vLocalRect.xy + vLocalRect.zw) - vLocalRect.xy;
vec2 relative_pos_in_rect =
clamp(local_pos, vLocalRect.xy, vLocalRect.xy + vLocalRect.zw) - vLocalRect.xy;
#else
float alpha = 1.f;
vec2 local_pos = vLocalPos;
Expand Down
3 changes: 1 addition & 2 deletions resources/shaders/ps_rectangle_clip.fs.glsl
Expand Up @@ -3,11 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

void main(void) {
#ifdef WR_FEATURE_TRANSFORM
float alpha = 1.f;
#ifdef WR_FEATURE_TRANSFORM
vec2 local_pos = init_transform_fs(vPos, vLocalRect, alpha);
#else
float alpha = 1.f;
vec2 local_pos = vPos;
#endif

Expand Down

0 comments on commit 8589702

Please sign in to comment.