I am wondering if there is a way to use a GUITexture as a background? I am rendering with an orthographic camera, and I have a 480x320 texture on a plane that is sized to exactly 480x320 pixels (yes, it’s something for the iPhone
), and with that setup, the image is blurry; however, if I load the image into a GUITexture, it is pixel perfect. See image:
You can use multiple cameras for this. Set up a camera that renders first, which has all of your background GUITextures, and then put everything else in a second camera that renders on top of it…
You can also try turning off bilinear filtering on the texture on the plane.
–Eric
Matthew: I figured that, I suppose I would have gotten it working faster if I had remebered the ‘depth’ setting on the camera ![]()
Eric: I tried that, it didnt make a difference, because in the orthographic view, the distance of the plane from the camera is irrelevant (as far as I can tell…pulling the plane closer or further from it didnt help). The texture draws at the same size, wether the camera is right next to the plane or a hundred units away.
Anyway, got it working with another camera in the scene, thanks a lot guys.
You might also try turning off mipmapping on that texture if you haven’t already. I’ve gotten pretty crisp results from a non-mipmapped texture on a plane viewed by an orthographic camera.
Yeah, at first I thought that combined with filtering might do the trick, and it does look good, but what I really needed was a pixel exact background, and the GUITexture just seemed to provided a better result for that than the other method. The other nice thing is that I don’t have to worry about scene lighting with the GUITexture objects.
