Closed ziibibi closed 10 years ago
It's possible it's a result of the bitmap repeating at the edges. If you overscale the matrix a bit, do these lines get reduced a bit?
You can also try changing the following line in this file https://github.com/StarlingGraphics/Starling-Extension-Graphics/blob/master/extension/src/starling/display/shaders/fragment/TextureFragmentShader.as
Change "tex ft1, v1, fs0 <2d, repeat, linear> \n" +
To "tex ft1, v1, fs0 <2d, clamp, linear> \n" +
Let me know if either of these changes or fixes it for you - it'll help narrow down the cause.
Thanks for a quick response! I looked up that file and it was: "tex ft1, v1, fs0 <2d, repeat, linear> \n" + somehow ... But still this change helped!
Now should I just compile from source to avoid bug in a future or that is a bug and will be fixed in some near release?
Well this means that your error is occurring due to texture repeating - however, this is something we usually want on by default! (Think about most bitmap fills in Flash, you get the imaged tiled over and over again).
I suggest introducing a scaling parameter to the matrix you pass to your beginTextureFill() call.
You want to scale it up by a tiny amount (enough to push a single pixel off the edge). The amount you want will be relative to the resolution of your bitmap.
If your texture was 512x512, you want to scale it up by 1/512 in both axis to get the desired effect. Ie
scaleX = (1 + 1/texture.width) scaleY = (1 + 1/texture.height) matrix.scale( scaleX, scaleY ) beginTextureFill( texture, matrix )
Thanks, will try that.
Just tried to reset TextureFragmentShader and apply scaling to matrix and somehow it doesn't work - it removes most of artifacts, but not all of them.
Hello! I have problem with displaying an extra large bitmap with graphics extention - it's like 6000px in width and obviously cannot be displayed as single texture due to max size limit. Hence I'm using graphics extension, split bitmap data into smaller chunks and draw each of them with separate call. So far so good, it works. With one major issue - borders of bitmap tiles might not stick together so good:![image](https://cloud.githubusercontent.com/assets/7167190/2981517/4af7e6ea-dc07-11e3-9621-ce789e947e46.png)
Can anyone tell me whats a problem and how can it be fixed?
Regards, J