Thanks,
anyway I need to add the alpha channel only during a preprocess stage while
the shader approach will do it every time I draw a frame, I guess.

I found a post that suggested to 'change/set' the internal format to
something like RGBA if the image is not already in that format, but then I
wonder how to access the content/channels of the image...am I supposed to
manually read the _data member (that is unsigned char*), extract RGB values
and modify it accordingly?

Thanks
Alessandro



On Tue, Jun 1, 2010 at 8:35 AM, J.P. Delport <[email protected]> wrote:

> Hi,
>
> have a look at the render to texture examples (grep for "attach"). You
> create an RTT camera, attach your RGB texture as input, create an RGBA
> output texture and attach this as the output, then in a shader do your sums.
>
> jp
>
>
> On 31/05/10 18:15, alessandro terenzi wrote:
>
>> I have an Image coming from a texture, and I'd like to add an alpha
>> channel with values that are an average of the corrensponding pixel RGB
>> values. Is there any example that could help?
>>
>> Thanks.
>> Alessandro
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.  MailScanner thanks Transtec
> Computers for their support.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to