Shaders for the GUI

Do you guys think it’d be possible/reasonable to use shaders to decorate a gui element such as a window?

My understanding of DirectGUI so far seems to point to using 9 tiles for a each window if I want it to be resizable without stretching the graphic elements: 4 for the borders, 4 for the corners and 1 for the center of the window which is really the only thing that stretches.

Wouldn’t it be possible to write a shader that looks at the position of the pixel in relation to the size of the object and takes on a border color if it’s close enough to the edge of a window? Wouldn’t this allow for fairly elaborate and procedural borders?

Manu

Sure. You could do really nice pixel-based graphics that way. It’s up to you; the 9-tile system is not really so bad either. (It still counts as a single object if you mesh all the tiles together.)

David