jPCT-AE - a 3d engine for Android > Support

Normal map texture unexpectedly get compressed

(1/1)

tiantian20007:
I'm doing basic normal map shading, but the result is quite strange.
So I attached the normal map directly to my model as the basic color and found it unexpectedly got compressed.
You can see the image bad.png in the attachment. The color seems sudden change and not smooth.
But the original texture is quite smooth as you can see the image good.png in the attachment.

Is there a way to avoid texture compression?
I already did:
normalTexture.setTextureCompression(false);
but not work.

tiantian20007:
Add the bad.png.

EgonOlsen:
If you don't enable it yourself, no texture compression will be used. It might be your output instead, which might be 16 bit. How are you creating the GL context? You can specify a depth in the AAConfigChooser, for example.

tiantian20007:
Thx a lot! My code is based on the custom shader sample, and I found the code:

Texture.defaultTo4bpp(true);

Change it to:

Texture.defaultTo4bpp(false);

and problem solved!

Navigation

[0] Message Index

Go to full version