Generated texture is black unless fiddled with

Hey, sorry for the title, I never know how to describe the situation in a short way.

In my game, I’m generating procedural textures for planets and stars. So… it works. It works really well, except for one thing.

This is what it looks like:

Nice, isn’t it… Apart from few black spots.
Well, this happens when I regenerate it (just exit and hit play again, it chooses random seed each run):

So I thought: “Hm… I must’ve messed up the code somehow.”, so I checked everything, and realized everything was right…

I’ve found out, that if I double-click on the generated texture in the material, it will show some options in the inspector (aniso-level, wrap mode, and filter mode), and when I change ANYTHING there, the texture fills up. I’ve also tried saving the generated texture, and it saves it whole, with no black pixels.

Anybody experienced anything similar? Should I report this as a bug?

I’ll probably crosspost to reddit as well, thanks :slight_smile:

Oh whoeverisupthere! I’m so stupid.

I only forgot to add


to the code…