I have written a program to procedurally generate some terrain in chunks with a custom shader. However the initially loaded chunks are appearing as black (shown below).
However when I load new chunks they correctly show the texture (shown below, the new chunks are the ones on the left while the black ones are the initial chunks).
This wasn’t happening in a previous old build of Unity (5 something). Currently using 2019.3.9f1. The textures also appear correctly in the built version. Any ideas what could be causing the problem?