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

black stripes on texture when shadow enabled on mobile devices #7176

Open
riematrix opened this issue Oct 22, 2018 · 12 comments
Open

black stripes on texture when shadow enabled on mobile devices #7176

riematrix opened this issue Oct 22, 2018 · 12 comments

Comments

@riematrix
Copy link

Shadows not working as expected on andriod/ios browsers.
on Android there are black stripes when zoom in;
on ios the shadow is not displaying correctly.

Sandcastle example: 3D Tiles Photogrammetry.html

var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain(),
shadows:true
});

var tileset = new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(6074)
});

viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);

Browser: safari ios

Operating System: ios

@hpinkos
Copy link
Contributor

hpinkos commented Oct 22, 2018

@riematrix can you paste a screenshot of what you're seeing please?

@riematrix
Copy link
Author

here is a screenshot of one android device:

_20181022225754

on ios the result of shadow can not be recorgnized.

@hpinkos
Copy link
Contributor

hpinkos commented Oct 22, 2018

Thanks @riematrix! @lilleyse any ideas?

@lilleyse
Copy link
Contributor

We've noticed some aliasing in iOS, likely due to less depth buffer precision #4752. Some Android devices might be having the same problem.

There's also a separate issue for poor shadows on photogrammetry, or really any models that don't have normals. #5723 has some details. But on desktop it still looks a lot better than that screenshot.

@riematrix could you also see if aliasing is a problem in this shadows demo:

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/gallery/Shadows

@lilleyse
Copy link
Contributor

Also brought up in #7178.

@riematrix
Copy link
Author

@lilleyse I tried the official demo which using the single plane model. The shadow looks ok during rotation on ios. Maybe it's a problem of shadow on 3d tilesets?

@lilleyse
Copy link
Contributor

@riematrix thanks for checking that out. Then it is likely #5723 that is responsible for a lot of the aliasing.

@riematrix
Copy link
Author

riematrix commented Oct 25, 2018

@lilleyse Thank you for the issue reference. I recalculated vertices normal for each tile and it looks correct on ios.
The black stripes still exist on both ios and android when zoom close.

@a0026
Copy link

a0026 commented Oct 29, 2018

Hello, my issue(#7178) has been closed, I wonder when it can be fixed, 3ks.

@riematrix
Copy link
Author

@lilleyse Hi, it seems that I've found something new about the black stripes. The attachment screen shot is a small object of a house that definitely has vertices normal. The black stripes looks much wider and you will notice something when looking very carefully at the phone's screen shot. I think those stripes may be more related with scale rather than buffer precision.
Hope you can give some instructions on how to debug or even fix this. Thank you!
phone

PC:
shadow

@hellorayza
Copy link

@lilleyse
Copy link
Contributor

#9064 fixes this for all the Android devices we've tried so far but I still see lots of artifacts in the original sandcastle on an iPad Pro and iPad 4

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