Hello Vincenzo,

Vincenzo Marafioti wrote:
> I would like to write to a Multi Render Target  FBOViewport  using a 
> Multipass Material. The texture attached to the FBO are rectangular 
> texture (not clamped beetween 0-1). I am using a simple blending 
> function (BlendChunk) for merging single pass result:
> 
>     //setup blendChunk
>     beginEditCP(_blendChunk);
>         _blendChunk->setSrcFactor(GL_ONE);       
>         _blendChunk->setDestFactor(GL_ONE);
>         _blendChunk->setEquation(GL_FUNC_ADD);                   
>     endEditCP(_blendChunk);
> 
> and each ChunkMaterial of the Multipass Material share the same _blendChunk.
> The output seems to be clamped beetwen [0 - 1]. Am i doing something 
> wrong? Should i set manually that the blend function is working on 
> rectangular value (i do not what them to be clamped)?

i'm a little confused, do you want the values in the texture to not be 
clamped, or do you mean addressing the texture by integers (i.e. pixels) 
instead of the usual coordinates in [0 - 1]?
For the latter you need to create the textures as 
GL_TEXTURE_RECTANGLE_ARB, with min/mag filter GL_NEAREST (no filtering 
is supported on rectangular textures) and wrapS/wrapT set to GL_CLAMP. 
In the shader these textures are read with textureRect2D();
The BlendChunk should not matter much and I have a DeferredShading core 
in development that uses the same settings as you.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to