New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 629663 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

CSS matrix3d incorrectly culls visible elements

Reported by doug...@gmail.com, Jul 19 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36

Example URL:
http://jstraight.com/1376/13/show

Steps to reproduce the problem:
1. http://jstraight.com/1376/13
2. Click Run
3. Click in the view (black box) in bottom right pane
4. Move the mouse around so the wall is just about to be clipped on the left edge
5. Note that all of the divs disappear the moment that it the first wall div touches the left edge of the view.

What is the expected behavior?
Correct cull

What went wrong?
Browser is improperly determining that all of the divs are not visible. It does not seem to take the perspective into account.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 51.0.2704.79  Channel: stable
OS Version: Ubuntu 15.10
Flash Version: 

Works perfectly in firefox 47
 

Comment 1 Deleted

Cc: rnimmagadda@chromium.org
Labels: Needs-Feedback
@doug16k: Could you please have a look at the attached video and let us know if this is the correct behavior to reproduce this issue.

Else, provide us the screen-recording for better understanding. Which would help us in triaging it further.

Thank you.
629663.ogv
1.4 MB View Download

Comment 3 by doug...@gmail.com, Jul 26 2016

When you click the area slowly turn the view to the right and left, until the left edge of the visible face touches the left side. 

As soon as the div touches the side, the whole row of divs disappears. Turning back to the right makes them all reappear, when the first one is no longer clipped.

They would be offscreen/clipped if there were no perspective, but they should remain visible, because perspective is on.

You can use W A S D keys to move too, but the starting position is a good reproduction, simply looking slightly left and right. Try it in firefox too, for comparison, it clips/culls correctly.

Sorry, the example is rather crude, I wanted the minimum amount of stuff going on. It is simply a row of divs, transformed with matrix3d. It does implement a mouselook with WASD control with css though.


Comment 4 by doug...@gmail.com, Jul 26 2016

Nothing should disappear just because the view angle changed. My code does not cull at all, the matrix is being correctly calculated, shown in another browser correctly. The browser is improperly determining that the divs are not visible anymore. It would be right if there weren't perspective/matrix3d.

Comment 5 Deleted

Comment 6 by doug...@gmail.com, Jul 27 2016

The video you posted isn't showing the expected view because of a combination of a glitch in the initial view direction, and cancelling the pointer lock (for some reason a big look-right directionX input event happened). When you clicked to start view control it jumped for some reason, then you cancelled the pointer lock, which made you unable to look right sufficiently.

Can you try it again without cancelling the pointer lock? Use small mouse movements, sorry I realize now it is too sensitive. Thanks! The repro is when you look right a bit more than you did, and touch the walls against the left side of the viewport.

Comment 7 by doug...@gmail.com, Jul 27 2016

Sorry for pinging several times, I keep thinking of new information to provide.

You can use the left and right arrow keys to rotate the view right and left.
You don't need to touch any of the mouse interaction or pointer locking. Simply open the page http://jstraight.com/1376/13/show and press left arrow a few times (to look left a bit, which works okay), then stop doing left arrow and do several right arrow keypresses. Notice that once the first div touches the left they all disappear (apparently improperly determined offscreen).

Comment 8 by doug...@gmail.com, Jul 29 2016

Here's an improved test case. Notice that you can walk around the room and when you get near the corners, things randomly flicker. Nothing flickers on firefox though, they are all there. Nothing hides. It just sets all the transforms.

http://jstraight.com/1376/16/show

See code at http://jstraight.com/1376/16

Just look up a bit to see the floor disappearing. The backface cull is not right.

To see more, click inside the viewport and walk around with WASD+mouse first-person-shooter style interface. Get near a wall, look toward it, fine, look away, disappears.

Comment 9 by doug...@gmail.com, Jul 29 2016

Ah I should not have said "randomly". It is deterministic. If you are facing toward a face (the view vector is toward the normal vector of the div) then it is visible. If you are facing away from a face at all, so the view vector is in the same direction as the div normal, then it disappears. It is not taking perspective into account. Instead of taking the normal vector dot the view vector, it should be dotting a vector from the view to the face with the div normal vector.


Comment 10 by doug...@gmail.com, Jul 29 2016

Here's a version that makes a fully enclosed room. http://jstraight.com/1376/18/show

If you face toward a face, it appears, if you look away from a face, it disappears. Get close to walls and look slightly away from them to make them disappear. Removing "backface-visibility: hidden" makes the disappearance stop.

Components: Blink>CSS
Project Member

Comment 12 by sheriffbot@chromium.org, Aug 12 2016

Labels: -Needs-Feedback Needs-Review
Owner: rnimmagadda@chromium.org
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: IO>MouseLock
Labels: -Type-Compat -Needs-Review OS-Mac OS-Windows Type-Bug
Owner: ----
Status: Untriaged (was: Unconfirmed)
Able to repro this issue on Windows 7, MAC (10.11.6) & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 52.0.2743.116 & Canary Version - 54.0.2829.0

This is a Non-Regression issue existing from M40 - # 40.0.2172.0

Before this build, the "WASD movement, mouse look" looks tiny and is not full screen.
Status: Available (was: Untriaged)
Components: -Blink>CSS -IO>MouseLock Blink>CSS>3D Blink>Paint
Status: Untriaged (was: Available)
Owner: wkorman@chromium.org
Status: Assigned (was: Untriaged)
I have to think this is a problem with visible rect calculations. Assigning to our new expert in the area, but maybe it's on the compositor side and not Blink.

Comment 17 by doug...@gmail.com, Aug 20 2016

I think it is more to do with backface cull dot products of vectors/surface normals. It is possible to make it disappear when it is fully onscreen. It seems to be dotting the surface normal against the wrong vector. Facing "toward" a face slightly makes it appear, facing slightly away from a face makes it disappear.

Comment 18 by doug...@gmail.com, Aug 20 2016

For example, in the provided "enclosed room" repro (with brick texture everywhere) http://jstraight.com/1376/18/show , looking down slightly makes the whole ceiling disappear. Looking up slightly makes the whole floor disappear.

Comment 19 by suzyh@chromium.org, Mar 24 2017

Components: -Blink>CSS>CSS3D Blink>Compositing>Transform3D
Cc: wkorman@chromium.org
Owner: ----
Status: Available (was: Assigned)
I don't expect to be able to look at this soon, unassigning self to allow others to look if they are able to do so sooner.
Project Member

Comment 21 by sheriffbot@chromium.org, May 14 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Untriaged)
Working correctly now.

Sign in to add a comment