【发布时间】:2014-04-09 13:24:34
【问题描述】:
我想从 JPG 加载背景纹理,将其缩小到合适的大小。所以我有 1920x1080 的图片,我将其缩放到 ~800x480。
BitmapTextureAtlas splashTextureAtlas = new BitmapTextureAtlas(this.getTextureManager(), 1920, 1080, TextureOptions.DEFAULT);
splashTextureRegion = BitmapTextureAtlasTextureRegionFactory.createFromAsset(splashTextureAtlas, this, "new/splash_bg1.JPG", 0, 0);
splashTextureAtlas.load();
Sprite splash = new Sprite(0, 0, splashTextureRegion, mEngine.getVertexBufferObjectManager());
splash.setScale(mainScaleX);
而且效果很差。
原始文件
我在屏幕上看到的
我尝试使用不同的 TextureOption 但没有任何效果。 你能告诉我我做错了什么吗?
更新
即使我保持纵横比质量很差
【问题讨论】:
-
这不是一个奇怪的问题,它被称为色带,它发生在渐变图像上,你可以使用抖动来解决它,抖动的优点之一是你可以使用具有相同渐变的小(100X100),您可以将它们放大到(1000X1000),并且仍然具有整洁的渐变背景并节省纹理空间。
标签: android opengl-es andengine