I would like to access different levels of detail in my GLSL fragment program. I'm currently stuck with using legacy OpenGL, including GLSL 1.2. Unfortunately, I don't have control over that.
I see that the texture2DLod()
method exists, but it appears it can only be used in a vertex program.
I have read this question, but they appear to be working with GLSL 1.4 or later. Unfortunately, I do not have that option.
Is there any way in a GLSL 1.2 fragment program to sample a specific mipmap level?
If there's no function for doing it directly, is it possible to send the mipmaps in as separate textures without doing 8 copies?