Specify highp sampler2D for clipping plane textures to improve reliability on some devices #9060
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9023.
Some devices with Mali GPUs (mostly Android, but also seen on some Chromebooks) were having trouble with clipping plane reliability, apparently due to precision problems. As observed in #8311, WebGL implementations are free to use lower precision sampling if the precision isn't specified, so this PR explicitly specifies
highp
on texture sampling for clipping planes. This seems to help on the devices in the issue above.I also tested
Model
,pnts
,b3dm
,i3dm
, andGlobe
clipping planes with these changes on Chrome and Firefox in Linux and on Internet Explorer and Chrome in Windows, both using float textures where supported and usingCesium.ClippingPlaneCollection.useFloatTexture = function() { return false; };
to force theuint8 RGBA
codepath, and it looks like this doesn't cause problems there.@lilleyse can you test in Safari on macos?