wowserhq / wowser

World of Warcraft in the browser using JavaScript and WebGL
MIT License
240 stars 63 forks source link

Fix: Added default texture to ADT chunk alpha maps #115

Closed fallenoak closed 8 years ago

fallenoak commented 8 years ago

Texture array uniforms need to contain at least one value or WebGL prevents loading the uniform and emits an error. ADT chunk alpha maps, in some cases, may have zero values (such as when the terrain only has a base texture, and no layers).

This fixes the issue by adding a default texture to ADT chunk alpha maps in the event no alpha maps were defined in the chunk's MCAL.

Closes #114.

fallenoak commented 8 years ago

Tested fairly extensively-- ran around Howling Fjord, Ashenvale, Redridge, and Duskwood with the change applied. No WebGL errors, and no visible regressions (that I noticed).

timkurvers commented 8 years ago

Awesome, thanks for looking into this! :+1: