GUI textures come out beautifully crisp because they use a perfect 1:1 pixel ratio. Unfortunately, I can’t render a GUI Texture behind a 3D object. Making a plane behind the camera and eyeballing it just doesn’t cut it in terms of image quality. What is the best method for getting a background to have an accurate pixel to screen ratio?
You can, using multiple cameras.
–Eric
Mind expanding on that a little?
I’ve got a scene with 3 cameras. One rendering the main view at a camera depth of -1. On top of that is a second camera rendering the UI at a depth of 0 with the GUILayer component added. A third camera is on the top, rendering some 3D parts of the UI. With everything I try GUI.Button, GUI.Box, etc all render on top of the third camera.
Oh…you said GUITexture, which is different from OnGUI functions, which are always on top (and don’t need a GUILayer camera, it’s a separate thing).
–Eric
I’m using Ongui and I don’t seem to get getting 1:1.
If I put a texture of 320x480 at 0,0 I still see around the edges–I would expect it to fill every pixel on the screen. Anyone else experiencing this?
Happens in both Dev and on the phone.
OnGUI has margin settings, which you’d have to change. You’d be better off using GUITextures anyway, because they don’t have the overhead of OnGUI. Also you can layer GUI stuff with cameras that way. ![]()
–Eric