I don't think I understand. I got the render target to have a working
alpha channel, if you render something in there with an alpha channel
it will modify the alpha of the render target.. what you do from there
doesn't matter...

Are you trying to do a mask like for a minimap or something?

On 8/31/07, Schizo N/A <[EMAIL PROTECTED]> wrote:
> I did do ClearBuffers(true, true).  Did you get the RT texture to have an
> opacity map, or is it just completely transparent?  The reason I'm
> overlaying the front buffer w/ an alpha 0 black is to try to see if
> $translucent 1 works.  My actual RT texture has color data w/ varying
> degrees of alpha that I want to draw intact.  I can't do this w/ $alphatest
> 1.
>
> >From: "Maurino Berry" <[EMAIL PROTECTED]>
> >Reply-To: hlcoders@list.valvesoftware.com
> >To: hlcoders@list.valvesoftware.com
> >Subject: Re: [hlcoders] Render Target Texture Translucent
> >Date: Fri, 31 Aug 2007 03:56:15 -0400
> >
> >You need to do:
> >
> >materials->SetRenderTarget(rt);
> >materials->Viewport(0,0,rt->GetActualWidth(),rt->GetActualHeight());
> >materials->ClearColor4ub( 0, 0, 0, 0 );
> >materials->ClearBuffers(true,true);   //Important - You missed this!
> >
> >
> >However I encountered a problem where the RT would end up losing it's
> >alpha after a level change and clearing alpha would no longer work
> >(rgb would though).. I haven't been able to resolve that yet, good
> >luck.
> >
> >On 8/31/07, Schizo N/A <[EMAIL PROTECTED]> wrote:
> > > I setup this render target texture using the following code:
> > >
> > > s_pCombatCharsTex0.InitRenderTarget( 256, 256,
> >RT_SIZE_FULL_FRAME_BUFFER,
> > > IMAGE_FORMAT_RGBA8888, MATERIAL_RT_DEPTH_SEPARATE, false );
> > >
> > > I then clear it by setting it as the current render target and using a
> >clear
> > > color of float4(0,0,0,0). When I render it using my frontbuffer
> >material, it
> > > displays completely black, which is correct, but it's not transparent. I
> > > have "$translucent" 1 in the .vmt file, but it doesn't work. Using
> > > "$alphatest" 1 works, but I want an opacity map, not a rejection of
> >alpha
> > > less than 178. I'm pretty much stumped as to why this is happening. It's
> > > probably something really simple I'm missing.
> > >
> > > _________________________________________________________________
> > > Messenger Café — open for fun 24/7. Hot games, cool activities served
> >daily.
> > > Visit now. http://cafemessenger.com?ocid=TXT_TAGHM_AugHMtagline
> > >
> > >
> > > _______________________________________________
> > > 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
> >
>
> _________________________________________________________________
> Puzzles, trivia teasers, word scrambles and more. Play for your chance to
> win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink
>
>
> _______________________________________________
> 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

Reply via email to