Just a guess - if you check the frame debugger, is your object being drawn before the skybox? Your shader writes to depth buffer and not to color, so if the skybox was drawn after it then the skybox wouldn’t write color where your object is, and you will be left with whatever clear color you have for the camera.