Search Unity

Only getting one pixel from an external texture

Discussion in 'General Graphics' started by jrmgx, Nov 11, 2016.

  1. jrmgx

    jrmgx

    Joined:
    Oct 21, 2016
    Posts:
    41
    I created an external texture (from Android) and pass it to unity through a texture id, it works quite ok. The texture information can be seen (in log) and goes to Unity but only one pixel pass from the texture to the final object I render the texture on, and that pixel seems to be stretched all across the object.

    I'm not using any modeling program, I use an Unity object (basic cube), and the texture comes from code. I don't think there is any problem with the model, do you have any idea of what could be wrong and lead to that kind of result?

    I found a quite similar problem on Google, but I don't understand the solution and I'm not even sure it is related: https://www.opengl.org/discussion_b...1-Only-getting-one-pixel-of-a-texture-Windows

    You can check some code here: https://gist.github.com/jrmgx/e0319c2b898115d1a55e50e423f96dfb

    And this is the cube used:

    See the view on the top left, and the cube