NASAWorldWind / WebWorldWind

The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
885 stars 384 forks source link

WebGL unbound texture warnings in Chrome #302

Open markpet49 opened 6 years ago

markpet49 commented 6 years ago

Description

Several examples (Annotations, DeepPicking and others) display the following WebGL warning in the console:

[.Offscreen-For-WebGL-0x1633cf178600]RENDER WARNING: there is no texture bound to the unit 0

This warning occurs many times and appears to be linked to the mouse cursor scrolling over the canvas.

Operating System and Version

Ubuntu 16.04/Chrome 61

balhar-jakub commented 6 years ago

Confirm

Operating System and Version

Windows 10 / Edge 40

Beak-man commented 6 years ago

Confirmed in Windows 10/Chrome 62

Beak-man commented 6 years ago

This warning appears in the following Examples and Apps:

Examples:

Apps:

All other examples/apps are exempt from this warning. Tested in Chrome 62, Windows 10.

claudiaifrim commented 6 years ago

Confirmed on Linux Mint, Chrome Version 62.0.3202.75 (Official Build) (64-bit)

pdavidc commented 6 years ago

Chrome logs this warning when a WebGL draw call is made that meets two criteria:

  1. The bound shader program expects a texture.
  2. No texture is bound.

This warning appears in Chrome on all operating systems, and it appears whether or not the shader actually reads from the texture. This behavior is consistent with WebGL Security principles. Read the conclusion of the WebGL Security white paper for details. @kenrussell, a WebGL developer and WorldWindJava collaborator alumnus, explains this in a conversation on the three.js repository.

WebWorldWind drawing code needs to adjust to accommodate Chrome's warnings. We'll bind a small blank texture whenever the bound shader program may use a texture, even if we've disabled the texture read via a uniform variable.