Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prim_shared: Fix clip mask perspective interpolation. #3145

Merged
merged 2 commits into from Oct 1, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -121,14 +121,12 @@ VertexInfo write_vertex(RectWithSize instance_rect,
vec4 world_pos = transform.m * vec4(clamped_local_pos, 0.0, 1.0);

// Convert the world positions to device pixel space.
vec2 device_pos = world_pos.xy / world_pos.w * uDevicePixelRatio;
vec2 device_pos = world_pos.xy * uDevicePixelRatio;

// Apply offsets for the render task to get correct screen location.
vec2 final_pos = device_pos + snap_offset -
task.content_origin +
task.common_data.task_rect.p0;
vec2 final_offset = snap_offset - task.content_origin + task.common_data.task_rect.p0;

gl_Position = uTransform * vec4(final_pos, z, 1.0);
gl_Position = uTransform * vec4(device_pos + final_offset * world_pos.w, z * world_pos.w, world_pos.w);

VertexInfo vi = VertexInfo(
clamped_local_pos,
Binary file not shown.
@@ -0,0 +1,25 @@
---
root:
items:
-
type: stacking-context
bounds: [0, 0, 0, 0]
perspective: [1, 0, 0, 0, 0, 1, 0, 0, -300, -250, 1, -0.5, 0, 0, 0, 1]
items:
-
bounds: [0, 0, 0, 0]
type: stacking-context
transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
items:
-
bounds: [0, 0, 100, 100]
type: rect
color: red
-
bounds: [0, 0, 100, 100]
type: rect
color: green
complex-clip:
rect: [0, 0, 100, 100]
radius: 16

Binary file not shown.
@@ -0,0 +1,23 @@
---
root:
items:
-
type: stacking-context
bounds: [0, 0, 0, 0]
transform: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 139, 0, 1]
perspective: [1, 0, 0, 0, 0, 1, 0, 0, -299, -250, 1, -0.5, 0, 0, 0, 1]
items:
-
bounds: [0, 0, 0, 0]
type: stacking-context
transform: [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1, 0, -5382, -3222, -18, 1]
items:
-
type: box-shadow
bounds: [548, 200, 100, 100]
color: 0 0 0 0.7020
blur-radius: 20
-
bounds: [548, 200, 100, 100]
type: rect
color: 0 255 0 1.0000
@@ -23,5 +23,7 @@ platform(linux,mac) == perspective-mask.yaml perspective-mask.png
rotate-clip.yaml rotate-clip-ref.yaml
clip-translate.yaml clip-translate-ref.yaml
platform(linux,mac) == perspective-clip.yaml perspective-clip.png
platform(linux,mac) == perspective-clip-1.yaml perspective-clip-1.png
platform(linux,mac) == perspective-shadow.yaml perspective-shadow.png
== complex-preserve-3d.yaml blank.yaml
platform(linux,mac) fuzzy(9,348) == perspective-border-radius.yaml perspective-border-radius.png
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.