I am having a texture issue that has me stumped.
I'm building an OpenGL renderer with which I've loaded and rendered several models and textures from multiple sources.... all worked as expected. Then I generated a terrain using WorldMachine. I exported an OBJ with a diffuse texture. For some reason that world machine generated texture renders incorrectly. This is what its supposed to look like.
When I load it onto it's model in my renderer it looks like this:
Stealing a texture from another model that's loading and rendering correctly and applying it to this terrain model it looks like it renders correctly.
I'm using stb image loader. The terrain texture seems to load correctly. STB reports that both have 3 channels....
I'm at a loss. It seems like its an issue with the texture its self but I have no idea what it could be. The terrain texture is 1025x1025, the one that works is 4096x4096. Reading here confirms that modern hardware shouldn't have issues with non power of two textures so I don't think that's it. I don't know a huge amount about texture formats (jpg/png) is there some rgb ordering or bit size considerations that I need to be aware of?
Does anyone know why this might happen?