Hi Coz,

If your RTT is set up correctly, then It might be simply that the
texturing you are using in your shaders of your main scene graph (that
uses the RTT textures) aren't doing what you want.  From your texture
it does kinda sound like your aren't using texturing though...  There
is so much unsaid about your setup I can't really guess what might be
up.

Robert.

On Mon, Aug 25, 2008 at 3:18 AM, Eduardo Alberto Hernández Muñoz
<[EMAIL PROTECTED]> wrote:
> Hi again,
>
> I have already set my RTT color buffer as RGBA; the texture attached
> to the camera is an osg::TextureCubeMap that I'm setting it up with
>
>    texture->setInternalFormat( GL_RGBA );
>    texture->setSourceFormat( GL_RGBA );
>    texture->setSourceType( GL_FLOAT );
>
> and using
>
>    std::cerr <<
> _Cameras[i]->getBufferAttachmentMap()[osg::Camera::COLOR_BUFFER]._internalFormat
> << std::endl;
>
> prints GL_RGBA. I have already set the camera's clear color to an
> alpha of 0 with
>
>    osg::Vec4 color ( 0.0, 1.0, 0.0, 0.0 );
>    cam->setClearColor( color);
>
> I have also tried
>
>    cam->attach( osg::Camera::COLOR_BUFFER, GL_RGBA );
>
> Before attaching my texture, but probably this isn't related.
>
>  -Coz
>
>
>> You'll need to make sure that the clear colour has an alpha of 0, and
>> that you RTT cololur buffer is RGBA.
>>
>> [...]
>>
>>> I have a RTT camera for cube mapped reflections; it now works well,
>>> except that I want to show only the reflected objects, not the clear
>>> color, when applied to an object; I have tried using the clear color's
>>> alpha with TexEnv, TexEnvCombine and AlphaFunc but I never got the
>>> result I wanted.
>>>
>>> Any pushes in the right direction?
> _______________________________________________
> 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