There's even a third layer -- engines like UE4 or Unity or libraries like SceneKit. There are so many steps to setting up shaders and lights that it's handy to have something that can intelligently handle all the moving parts -- like juggling the limited per-pixel lights with vertex lights, for example.