I'm writing a simple game set on the surface of the moon. I wrote a custom sky shader that works great, by modifying the shader code for ProceduralSkyMaterial, which I found in the C++ sources.
Now, I would like to do something similar by tweaking a StandardMaterial3D's shader, but because of conditional compilation and all, the shader code is barely readable in the C++ source.
So my question is: is there any simple way to read the gdshader code in use by a particular StandardMaterial3D ?

  • xyz replied to this.
  • Thrance So write a custom shader. You don't need actual "internal" source of the StandardMaterial3D for that. You can start by converting the standard material to a shader, look at the generated code and start playing with it.

    Thrance What is it that you want to do that standard shader material can't provide?

      xyz Basically I want to make an Earth material, applied to a sphere. I would like the night side to have some emissions and a different albedo texture to simulate the night lights.

      • xyz replied to this.

        Thrance So write a custom shader. You don't need actual "internal" source of the StandardMaterial3D for that. You can start by converting the standard material to a shader, look at the generated code and start playing with it.

          xyz Oh thanks, I didn't know you could "convert to shader material", that's exactly what I want. Thank you.