jdurrant Posted March 28, 2015 Share Posted March 28, 2015 I don't know if this is a bug, but I thought I'd post about it in case it's helpful to others. When I place an image texture on a plane, the bottom portion of the image "bleeds" into the top portion. To illustrate, I made a small PNG file that is entirely transparent, except the top row of pixels is red and the bottom row is blue. Here it is rendered on to a plane: As you can see, there's a bit of blue in the red, and a bit of red in the blue. To see if this problem was somehow related to transparency, I saved as a jpg too. Same issue: To confirm my theory that this is somehow related to "texture wrapping," I padded the image with a 1px-thick margin on the top and bottom row of the image, and the problem vanished: This isn't so big a deal in most contexts, but there are some cases when it causes noticeable problems. For example, I've created a grass field using lots of planes and transparent PNGs. Because the bottom row of pixels (not transparent) bleeds just a bit into the top row (fully transparent), a ton of lines end up hovering above the grass: This is especially noticeable when the texture dimensions are small. I've seen this "bleeding texture" issue in both Firefox and Chrome, on Mac OS X. I'd appreciate any additional suggestions beyond padding the textures with transparent margins. Thanks! Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 28, 2015 Share Posted March 28, 2015 I have to admit this is really weird, I have never experienced that.Did a little test, using the perfectly fitting dutch flag: There are no bleeding edges, it seems like a normal plan with the correct texture. What version of babylon are you using? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 28, 2015 Share Posted March 28, 2015 Just a guess, but are the .png's dims a power of 2? It is not a requirement as of OpenGL 2.0 (WebGL is a derivative of 2.0), but that seems like a reason that you might get this, but nobody else does. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.