Update WR, and copy new shaders.

This commit is contained in:
Glenn Watson 2016-10-20 10:31:49 +10:00
parent 6c28d4446a
commit 858970256a
5 changed files with 35 additions and 26 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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