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

Fix 3d transform primitives where the task offset is non-zero. #2250

Merged
merged 1 commit into from Jan 3, 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

Fix 3d transform primitives where the task offset is non-zero.

Fixes #2133.
  • Loading branch information
gw3583 committed Jan 3, 2018
commit cacd6541412fe22046178aec2e2f866df031dadd
@@ -648,7 +648,7 @@ VertexInfo write_transform_vertex(RectWithSize local_segment_rect,
// We also want that to apply to any interpolators. However, we
// want a constant Z across the primitive, since we're using it
// for draw ordering - so scale by the W coord to ensure this.
vec4 final_pos = vec4(world_pos.xy * uDevicePixelRatio + task_offset,
vec4 final_pos = vec4((device_pos + task_offset) * world_pos.w,
z * world_pos.w,
world_pos.w);
gl_Position = uTransform * final_pos;
Binary file not shown.
@@ -0,0 +1,16 @@
---
root:
items:
-
type: "stacking-context"
perspective: 1000
items:
-
type: "stacking-context"
transform: rotate-x(45) translate(100, 100, 0)
"transform-style": "preserve-3d"
items:
-
bounds: [0, 0, 200, 200]
type: rect
color: red
Binary file not shown.
@@ -5,6 +5,8 @@
# but fails when all the tests are run
fuzzy(1,2) == rotated-image.yaml rotated-image.png
== singular.yaml singular-ref.yaml
fuzzy(1,82) == perspective.yaml perspective.png
fuzzy(1,88) == perspective.yaml perspective.png
== prim-suite.yaml prim-suite.png
== segments-bug.yaml segments-bug-ref.yaml
== content-offset.yaml content-offset.png

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.