Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

All of my quads appear correctly textured on the Unity3D editor, a Motorola Xoom Android tablet, and on an iPad 2:

enter image description here

But on our Samsung Galaxy Mini 2 smartphone they kinda look like this:

enter image description here

I wrote a debug shader that outputs the texture coordinates U and V to the R and G channels respectively, and results were consistent:

enter image description here

What could be causing this difference between devices?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Found the problem. Apparently I needed to assign a vertex color to each vertex of the quad, even when the shader was not using that information. In other words:

var colors = new[] {
    Color.white,
    Color.white,
    Color.white,
    Color.white
};
mesh.colors = colors;

Assigning these colors solved the UV problem, although I'm not sure why it did.

share|improve this answer
1  
Yep, I've had a similar problem with libgdx batch sprites (on all devices). If I didn't asign any color at all to vertices, some quads would display texture normally, some not. –  Shivan Dragon Feb 28 '13 at 15:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.