Skip to content

Commit

Permalink
Update webrender, gleam and associated shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
gw3583 committed Sep 14, 2016
1 parent 1f1e92a commit 9535c5b
Show file tree
Hide file tree
Showing 18 changed files with 142 additions and 85 deletions.
30 changes: 15 additions & 15 deletions components/servo/Cargo.lock

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

32 changes: 16 additions & 16 deletions ports/cef/Cargo.lock

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

6 changes: 3 additions & 3 deletions resources/shaders/prim_shared.glsl
Expand Up @@ -567,7 +567,7 @@ float do_clip(vec2 pos, vec4 clip_rect, vec4 radius) {
// Apply a more gradual fade out to transparent.
//distance_from_border -= 0.5;

return smoothstep(1.0, 0, distance_from_border);
return smoothstep(1.0, 0.0, distance_from_border);
}

float squared_distance_from_rect(vec2 p, vec2 origin, vec2 size) {
Expand All @@ -580,9 +580,9 @@ vec2 init_transform_fs(vec3 local_pos, vec4 local_rect, out float fragment_alpha
vec2 pos = local_pos.xy / local_pos.z;

float squared_distance = squared_distance_from_rect(pos, local_rect.xy, local_rect.zw);
if (squared_distance != 0) {
if (squared_distance != 0.0) {
float delta = length(fwidth(local_pos.xy));
fragment_alpha = smoothstep(1.0, 0.0, squared_distance / delta * 2);
fragment_alpha = smoothstep(1.0, 0.0, squared_distance / delta * 2.0);
}

return pos;
Expand Down

0 comments on commit 9535c5b

Please sign in to comment.