I have a game with a custom sky. In godot, you can set the ambient light of an environment to your sky (so, i assume, fragments will just read the ‘ambient’ color from the sky color in that normal direction).
I want to create a better ambient lighting gradient, and I know that I can do that by creating a sky shader and setting my ambient light to ‘sky’. But I also still want the sky that I’m using now, which doesn’t have a good ambient light color. Obviously godot supports both manually programmed ambient lighting and it supports having an ambient light that isn’t your sky (setting it to ‘color’ etc) but I want to have both a custom sky shader and a non solid color custom ambient light shader- and I want them to be different.
This seems very trivial, but I can’t find a setting to do this. Is this just not supported in the way “Environment” is implemented? Is there a workaround? Thanks.
That’s true, I could just use an object for the sky. I am doing sketchy things with multiple cameras in the scene though which could make it a little jank. Is there no way to set the ambient light color to a separate sky resource than the main one?
Afaik, there isn’t. You can do your own ambient term calculation in a shader and sample whatever you want there, but then you’d need to run that shader on every object in the scene. If you’re running shaders on everything anyway then this is easily handled via shader include.
Multiple cameras shouldn’t be a problem. Either let each has its own sphere and exclude via visual instance layers or transfer one sphere among cameras when switching the camera.
You can also render a quad close in front of camera and run a shader on it that pushes its depth fully to background and sample a cubemap or equirect environment texture there. That way you don’t need to drag large spheres around.
Start with the simplest solution - the spheres, and see how it goes. If they prove inadequate in practice, you’ll have to use shaders, in one way or another.