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

Distorted Box Entity in iOS #7100

Closed
OmarShehata opened this issue Oct 1, 2018 · 4 comments
Closed

Distorted Box Entity in iOS #7100

OmarShehata opened this issue Oct 1, 2018 · 4 comments

Comments

@OmarShehata
Copy link
Contributor

OmarShehata commented Oct 1, 2018

This Sandcastle example looks like a perfectly fine box on desktop:

var viewer = new Cesium.Viewer('cesiumContainer');

var redBox = viewer.entities.add({
    name : 'Red box with black outline',
    position: Cesium.Cartesian3.fromDegrees(-107.0, 40.0, 0.0),
    box : {
        dimensions : new Cesium.Cartesian3(0.2,0.2,1),
        material : Cesium.Color.RED,
        outline : true,
        outlineColor : Cesium.Color.BLACK
    }
});

viewer.zoomTo(redBox);

box_fine

On iOS, the vertices seem to be displaced?

distorted

Forum post tested on iOS 11. I just tested on iOS 10.2.1

@mramato
Copy link
Contributor

mramato commented Oct 1, 2018

I can confirm this is still an issue in iOS 12.0 on an iPhone 7, but someone should check iPad as well to see if it's software/vs hardware issue.

@OmarShehata
Copy link
Contributor Author

I can reproduce this on the iPad Pro in the office, with iOS 12.2. This forum post may be the same issue. Here's another Sandcastle that, on desktop draws 20 lines:

Sandcastle

But on the iPad, only 4 lines are drawn. I haven't tried this myself but there's a suggestion in the forum thread there to modify the function in https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl to add:

if (length(highDifference) == 0.0) highDifference = vec3(0);

Before the highDifference is returned to fix this issue.

@jjhembd
Copy link
Contributor

jjhembd commented Feb 1, 2024

Resolved by #11788

@jjhembd jjhembd closed this as completed Feb 1, 2024
pupitetris pushed a commit to pupitetris/cesium-webxr that referenced this issue Mar 4, 2024
@onsummer
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants