Texture rendering bug - SGS2 DEV

Started by jonalibert, May 25, 2012, 11:44:02 PM

Previous topic - Next topic

jonalibert

Hi,

I have some trouble with texture rendering (floor), with this code, I obtain :

Texture texture2 = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.vertpic)), 64, 64));
TextureManager.getInstance().addTexture("vertpic", texture2);
            
floor = Loader.load3DS(is, 500)[0];
floor.scale(10);
            
floor.setCulling(Object3D.CULLING_DISABLED);
floor.rotateX((float)Math.PI);
floor.setTexture("vertpic");
world.addObject(floor);



Where do you think it come from ?

TY for any answer

Jo

EgonOlsen

Look like gpu inaccuracies. Mobile chips are using pretty low accuracy to get speed and save power. There's nothing you can do about this. You might want to try a larger texture, but i doubt that it will help, because coordinates are normalized anyway.

jonalibert

http://www.youtube.com/watch?v=_vesmHaDCow

TY for this answer but I did not expect this, Verily there is no solution to obtain a correct rendering? On this video the graphics engine seems to provide a rendering more than correct.

Jo

jonalibert


EgonOlsen

If you stretch a texture across a large object and are only showing a small part of it, you might run into accuracy issues. You can try to increase the polygon count...that might help, but i don't expect much from it. Another thing to try is to not stretch the texture that much and repeat it instead on the floor.
The video you are refering to doesn't stretch the texture but repeats it a few 100 times in each direction. It doesn't look perfect though but video compression evens out the artifacts. And it has been recorded on a Nexus S. The Nexus S has a PowerVR gpu, which has a higher internal accuracy than the Mali chipset of the S2. On the S2, the ground in this scene looks much more blocky.

jonalibert