You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: