user3162134
user3162134

Reputation: 307

Can you mix texture formats on mip map levels in Open GLES2.0

We use compressed textures on IOS for grass and sand textures, but the smaller mip map levels, which should go to a smooth colour, end up having detail in them as the compressed textures dither as they cannot represent the exact blended colour.

So, can we use a compressed texture for the 1024x1024, 512x512 and 256x256 then use a 32 bit texture for the 128x128 and smaller levels ? We would only incur a small increase in total texture size and get much better quality.

It seems you can pass in the format for each indivudal mip map level, but I've tried this but unless all texture mip map levels are the same format, everything seems to come out black, without actually causing a GL error.

Is it possible ?

Thanks

Shaun

OR,

Upvotes: 0

Views: 134

Answers (1)

Columbo
Columbo

Reputation: 6776

No unfortunately not.

From the gles 2 spec 3.8.7:

A texture is said to be complete if all the image arrays and texture parameters required to utilize the texture for texture application are consistently defined.

...

For 2D and 3D textures, a texture is complete in OpenGL ES if the following conditions all hold true: • the set of mipmap arrays are specified with the same type and the same format.

Upvotes: 2

Related Questions