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

Globe translucency artifacts when the number of imagery layers exceeds the texture uniform limit #8966

Open
lilleyse opened this issue Jun 16, 2020 · 0 comments

Comments

@lilleyse
Copy link
Contributor

From #8726 (comment)

When a terrain tile has more textures than the hardware-dependent texture uniform limit (16 on my machine) it issues multiple commands: an opaque command with the first 16 layers followed by blend commands with the rest of the texture layers. This doesn't work if the globe is translucent, especially if OIT is enabled, because the first and second commands will not blend properly with each other (OIT messes with the blend function) and there isn't a good time to apply to globe translucency. What you really want to do is blend all the globe commands normally then apply the translucency. The only solution that seems to work consistently in every scenario is to composite the texture layers to a new texture and use that in the globe shader, so that only one globe command gets issued into OIT.

The sandcastle below is using the ArcGIS terrain provider which, for whatever reason, uses > 16 textures for some tiles, maybe because of a misalignment in bing imagery / ArcGIS tiling schemes. This is where bluer areas appear - the first command will render most of sections of the tile and the second command will blend on top with the remaining sections, but since it applied globe translucency in the shader a layer that would normally be opaque becomes translucent and the base color shows through. This can be mitigated by (1) disabling OIT (2) setting the base color to TRANSPARENT.

Sandcastle
bug-arcgis

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

1 participant