Issues with planet demo shader

I’m using the Babylon.js - Planet demo shader and code in my game for planets, and am running into a slight issue:

I can’t find out what the issue is, other than the visual problem.

code is available here (see CelestialBodyMaterial)

you can test it here

Just encountered the same issue, what helped me was change inside your CelestialBodyMaterial.updateRandom() from:

for (let i = 0; i < 1048576; i++) {
    imgData.data[i] = Math.random() * 256 | 0
}

To:

for (let i = 0; i < 512 * 512 * 4; i++) {
    imgData.data[i] = Math.random() * 256 | 0
}

I found the issue! Apparently, during my conversion from a multi-scene system to a monoscene system I left out this register before render function: blankstorm/index.html at dc15965eda13a864da502b8eec59f469421f6fe4 · dr-vortex/blankstorm · GitHub

2 Likes