I’m new to opengl. I’ve read the texture altas documentations, to my understanding, most of them are talking about how to texture mapping different objects while look up to one single texture(that contains multiple textures in one layer).
Therefore, I’d like to render my scene(say a cornell box) to texture atlas. The idea is, since the scene is diffuse, it won’t matter where the camera is, so at run time I can look up texture atlas to shade these objects, instead of compute them.
My questions are:
do I need to separately render every objects to the texture? If so, how am I supposed to do that since the objects have provide occlusions for each other? Even if I succeeded in create the texture atlas, at run time, if I look up the texture atlas at fragment shader, I won’t have objects information to do that… what am I supposed to do?
Or, maybe I should directly render the scene to texture, but in this way I won’t be able to use the texture once the camera moves.
Thanks very much!