Hi, I was wondered why Qt3D diffusemap material doesn't implement texture alpha for fragColor or why there no diffuseMapAlpha material at least.
I tried to modify diffusemap.frag by analogy with normaldiffusemapalpha.frag set diffuseTextureColor as vec4 and make fragColor = vec4( diffuseTextureColor.rgb * ( ka + diffuseColor ) + ks * specularColor, diffuseTextureColor.a ); Alpha works, but there is ambient color that mess the transparency effect I want. I tried without ka component but got transparent black color. But at least in this case zero texture alpha make fully transparent. Then I encountered on unlittexture.frag and TextureMaterial.qml that use it (by the way why there is no corresponding QTextureMaterial?) that just set diffuseTextureColor to fragColor: fragColor = texture( diffuseTexture, texCoord ); But I got effect like there is white ambient summed with transparent texture color. With zero texture alpha I've got white non transparent object. I'm new in shaders, I'm confused with such behavior. Thanks in advance for any explanations! --- Regards, Oleg.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest