www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: lawless_c on February 28, 2014, 01:13:08 am
-
I've run into this odd quirk with a texture i loaded, to demonstrate it i have replaced the texture with one a bit more simple. when i view the textures in an editor they look fine, however loading them into jpct causes the a chunk of the left side to be cut of and moved to the right side.
Here is the texture (http://i.imgur.com/pHVGDsY.png)
Here it is being rendered.
(http://i.imgur.com/Vvc0sKW.png)
If you are wondering about the fuzziness it's because i haven't got shaders set up entirely correctly yet.
-
What am i seeing there? What is this texture being used for in the final image? Is it a kind of backdrop? About the fuzziness...looks like as if the texture coordinates are perturbed by some shader...does your shader apply an offset to coordinates?`That would also explain the shift to the left.
-
It's the shader from this demo.
http://www.youtube.com/watch?v=5Zgn1OCDIus
-
final text is intended to be planet ring, however i swapped it out with the red and white one to make it easier to perceive the problem.
-
It's the shader from this demo.
And that's the reason...that shader modifies the texture coordinates based on a normal and a height map. If it's a planet ring, i see no point in using this shader for it at all. I wouldn't use any special shader for it and rely on the default shaders and it should be fine.
-
Yup, that was it, functions perfectly now.