i have shader draws texture, , have constraint cannot change shader. has hardcoded bias of 0 passed texture2d. draw nth mipmap of texture using shader. i.e., have texture bound input shader level 0 corresponds level n of original texture.
is there (inexpensive, preferably) way this?
in es 3.0 , later, can restrict sampling range of levels setting sampling parameters accordingly. example, restrict sampling level, use:
gltexparameteri(gl_texture_2d, gl_texture_base_level, level); gltexparameteri(gl_texture_2d, gl_texture_max_level, level); these parameters not available in es 2.0. don't think there's way in es 2.0 without creating copy of texture.
note using bias in glsl code not mean fixed mipmap level used. adds bias calculated level of detail. bias of 0.0 same not providing bias @ all.
Comments
Post a Comment