Page 1 of 1

[fixed]Ogles: TRANSPARENT_ALPHA_CHANNEL_REF Material colors

Posted: Fri Mar 07, 2014 3:50 pm
by porcus
Hi,

I noticed that with EMT_TRANSPARENT_ALPHA_CHANNEL_REF the colors in the SMaterial are ignored.
This can be fixed by replacing:

Code: Select all

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
with:

Code: Select all

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
in the COGLESMaterialRenderer.h

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Posted: Fri Mar 07, 2014 5:43 pm
by CuteAlien
Hm, I think that's the way the materials is supposed to work. It either uses colors or textures - no combination. At least I think that's the way it also works on other platforms.

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Posted: Mon Mar 10, 2014 10:07 am
by porcus
I don't think so.
The OpenGL driver uses also textures and colors.
This makes also sense because if you don't want to use colors, just use white and you can get the same behaviour than without colors.

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Posted: Mon Mar 10, 2014 11:10 am
by CuteAlien
You are right. This got changed in the OpenGLMaterialRenderer after the OLG-ES branch got split off and hadn't been merged. My fault. Thanks for reporting - it's fixed in r4716. I've also added the other change for a LIGHTMAP material which was done at the same time in trunk.