Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Normal map texture unexpectedly get compressed
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Normal map texture unexpectedly get compressed (Read 1915 times)
tiantian20007
byte
Posts: 3
Normal map texture unexpectedly get compressed
«
on:
August 04, 2017, 10:58:15 am »
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.
«
Last Edit: August 04, 2017, 11:04:27 am by tiantian20007
»
Logged
tiantian20007
byte
Posts: 3
Re: Normal map texture unexpectedly get compressed
«
Reply #1 on:
August 04, 2017, 11:01:20 am »
Add the bad.png.
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Normal map texture unexpectedly get compressed
«
Reply #2 on:
August 04, 2017, 11:27:16 am »
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.
Logged
tiantian20007
byte
Posts: 3
Re: Normal map texture unexpectedly get compressed
«
Reply #3 on:
August 04, 2017, 11:44:24 am »
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!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Normal map texture unexpectedly get compressed