mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update WR, and copy new shaders.
This commit is contained in:
parent
6c28d4446a
commit
858970256a
5 changed files with 35 additions and 26 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue