Yes I'm well aware that I can render textures with alpha using VGUI. That's fine for "static" textures, but in my case I'm only rendering one portion of the original texture, and would like to "frame it" with a nice circular border. This is for a minimap, but I want to use this masking system for other HUD elements as well.
So what I want to do is use a seperate alphamask texture to show/hide parts of another surface ingame. Is that clearer? Now maybe there's already a functionality like this in the materials which allows us to specify an alphamask texture?
From: "Alfred Reynolds" <[EMAIL PROTECTED]> Reply-To: [email protected] To: <[email protected]> Subject: RE: [hlcoders] VGUI2 & Masking Date: Thu, 9 Feb 2006 11:18:35 -0800 VGUI2 already supports rendering transparent textures, just override the paint() function of the panel and don't draw where you don't want pixels (your source TGA art for the textures needs to have an alpha channel to make use of this functionality). - Alfred William Ravaine wrote: > Hey, > > Im trying to perform masking with VGUI surfaces. My goal is to take a > base > texture and apply a binary mask texture to it (white = transparent, > black = > solid) so that I can give my rectangular texture rounded edges or any > other > kind of shape I want. > > This is usually done by rendering the mask texture on the destination > surface, and then rendering the base texture on top using a special > blend > function that will only retain the parts of the base texture where > the color > of the mask texture underneath is black. > > Now I've been searching a bit in the HL2 SDK code, and the only > potential > tool I've found is RenderTarget and procedural textures. However, > there > doesnt seem to be any way of modifying the blend function from the > material > system, since I guess the blending formulas are defined in the > material > shaders themselves. > > So i'm wondering if there's an obvious, easy way of doing masking > that I > would have missed, or if I'm going ot have to resort to writting a > shader > for this? > > Any help appreciated! > Spk > > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

