Last Comment Bug 689498 - Intersecting planes are not z-ordered properly (need to implement plane splitting for CSS 3d transforms)
: Intersecting planes are not z-ordered properly (need to implement plane split...
Status: NEW
[webvr][css-vr]
: testcase
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal with 9 votes (vote)
: ---
Assigned To: :kip (Kearwood Gilbert)
:
Mentors:
http://romaxa.info/css3d/planes/Inter...
: 691861 937137 1106603 (view as bug list)
Depends on: 1175311 1274673 1097464
Blocks: 904304 505115 745523
  Show dependency treegraph
 
Reported: 2011-09-27 01:58 PDT by Oleg Romashin (:romaxa)
Modified: 2016-05-20 13:14 PDT (History)
24 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments

Description Oleg Romashin (:romaxa) 2011-09-27 01:58:16 PDT
Seems like z-ordering for intersecting planes not working properly
also I see this in debug build log
###!!! ASSERTION: Child transform frame must preserve 3d!: 'childFrame->Preserves3D()', file layout/generic/nsFrame.cpp, line 1484
Comment 1 Matt Woodrow (:mattwoodrow) 2011-09-27 15:09:59 PDT
The assertion is the same as mentioned in bug 689501 and appears to be invalid in both cases.

Sorting intersecting (or cycled) layers is a known problem that we don't handle at all currently.

Chrome has the same behaviour as us for this demo, they sort intersecting planes arbitrarily. They appear to sort these two planes in a different order for this demo, which looks slightly better.
Safari actually handles this correctly, using CoreAnimation, which apparently splits intersecting planes into multiple pieces so that they can be sorted correctly.

I'd quite like us to have plane splitting (or depth buffering) to solve this, but it's not an easy problem. I don't think we should block enabling 3d transforms on this, since the spec doesn't require any sort of specific sort handling.
Comment 2 Oleg Romashin (:romaxa) 2011-09-27 15:14:17 PDT
ok, make sense
Comment 3 Matt Woodrow (:mattwoodrow) 2011-10-07 15:40:49 PDT
*** Bug 691861 has been marked as a duplicate of this bug. ***
Comment 4 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2011-10-07 17:02:28 PDT
(In reply to Matt Woodrow (:mattwoodrow) from comment #1)
> I'd quite like us to have plane splitting (or depth buffering) to solve
> this, but it's not an easy problem. I don't think we should block enabling
> 3d transforms on this, since the spec doesn't require any sort of specific
> sort handling.

I wouldn't make that decision based on what the spec requires (especially this particular, not very thorough, spec).  I think the relevant criterion should be whether it's going to be a significant problem for authors.  It seems to me like it might be, but I'm far from the right person to judge that.
Comment 5 XtC4UaLL [:xtc4uall] 2011-11-23 09:06:31 PST
Link of Testcase of duped Bug 691861:
https://bugzilla.mozilla.org/attachment.cgi?id=564621
Comment 6 Alex Keybl [:akeybl] 2011-11-28 13:22:54 PST
[Triage Comment]
The bug this bug blocks is marked as resolved, so we didn't block on this. Minusing for tracking.
Comment 7 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2011-11-28 16:22:40 PST
(In reply to Alex Keybl [:akeybl] from comment #6)
> [Triage Comment]
> The bug this bug blocks is marked as resolved, so we didn't block on this.
> Minusing for tracking.

That doesn't make any sense.  We need to either explicitly decide that it's ok to ship 3D transforms (new bug) with this bug or we need to fix this bug for 10.
Comment 8 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2011-11-28 16:23:18 PST
sorry, s/(new bug)/(new feature)/
Comment 9 Alex Keybl [:akeybl] 2011-11-28 16:51:38 PST
(In reply to David Baron [:dbaron] from comment #7)
> (In reply to Alex Keybl [:akeybl] from comment #6)
> > [Triage Comment]
> > The bug this bug blocks is marked as resolved, so we didn't block on this.
> > Minusing for tracking.
> 
> That doesn't make any sense.  We need to either explicitly decide that it's
> ok to ship 3D transforms (new bug) with this bug or we need to fix this bug
> for 10.

You're right - I thought 505115 already landed with FF8 but was mistaken.

Who can weigh in on whether 505115 can be shipped without this bug fixed?
Comment 10 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2011-11-28 17:19:07 PST
(In reply to Alex Keybl [:akeybl] from comment #9)
> Who can weigh in on whether 505115 can be shipped without this bug fixed?

mattwoodrow, roc
Comment 11 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-11-28 18:20:38 PST
Safari and Chrome both shipped releases with this problem. I think we can too.
Comment 12 Alistair MacDonald 2012-04-12 12:22:25 PDT
Safari & Mobile Safari no longer have this problem. The problem still exists in Chrome and Firefox.

Broken: Firefox 14.0a1 (2012-04-12) -Win7
Broken: Chrome 20.0.1096.1 -Win7
Fixed : Safari 5.1.5 (75.34.55.3) -Win7
Fixed : Mobile Safari (last updated over a month ago) -iOs

Link to test-case and screen-grabs:
http://f1lt3r.com/code/3d-css-transforms-intersecting-planes-not-clipping/
Comment 13 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-11-12 02:33:17 PST
*** Bug 937137 has been marked as a duplicate of this bug. ***
Comment 14 Daes 2014-02-22 05:52:50 PST
This bug is really nasty. It forbids any polygon intersection in CSS 3D engines.
So it is impossible to make something appears through a plane for example.
Sadly, this is a really old bug and nobody seems to take care even if css3D sites are expanding a lot being the only way to be 3D compatible to safari devices.
Comment 15 Andreas Gal :gal 2014-02-22 06:05:19 PST
The test case url can no longer be reached. If you attach a simple test case, that the first step to any resolution here.
Comment 16 Daes 2014-02-22 06:48:34 PST
There is a very representative and easy example here:
http://jsfiddle.net/yNfQX/21/
Comment 17 Gregg Tavares 2014-02-22 06:55:56 PST
The URL at the top of the page still works and still shows the issue.

This one does too

http://greggman.com/downloads/examples/intersecting-elements-3d-css.html

Note that it doesn't work in Chrome either. Only Safari is subdividing the polygons to make things sort correctly. A zbuffer will fix the example at the top of the page but only subdividing will fix the 2nd URL.
Comment 18 Gregg Tavares 2014-02-22 07:19:37 PST
I don't know if it's appropriate to post here but this is the chromium issue # AFAICT

https://code.google.com/p/chromium/issues/detail?id=230833
Comment 19 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2014-02-22 10:12:20 PST
http://en.wikipedia.org/wiki/Newell%27s_algorithm is cited by http://dev.w3.org/csswg/css-transforms/#3d-transform-rendering as the way to handle this.
Comment 20 Benoit Girard (:BenWa) 2014-12-08 12:26:31 PST
*** Bug 1106603 has been marked as a duplicate of this bug. ***
Comment 21 :kip (Kearwood Gilbert) 2015-07-21 14:59:54 PDT
Before plane splitting can be implemented, the sort order must be corrected as it is incorrect even in cases where the planes do not intersect.

Bug 1175311 tracks the sorting fix, which is a prerequisite of this bug.

Note You need to log in before you can comment on or make changes to this bug.