Hi Jean Sébastien,

apparently my bug is due to bad view matrix, my shader need camera view
matrix to compute it's effect.

What you're proposing is to copy slave camera view matrix into master
(default) camera matrix each frame, am I right ?

Isn't it another way yo avoid this copy ? isn't it a little expensive ?

2009/5/15 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com>

> Hello Alexandre,
>
>  Well apparently I did achieve to set up my application with 2 slave
>> camera, but there is one last problem, I'm using a shader for my sky sphere
>> wich isn't working when using 2 slave cameras, has anyone already had
>> trouble with shaders and slave camera ?
>>
>
> Do you mean that (for example) lighting calculations give the wrong
> results?
>
> IIRC, if you need the projection/view matrix then you can't use the
> built-in uniform from OpenGL, because that will be your slave camera's
> projection/view matrix. You need the master view's matrices, which means
> you'll have to copy the master camera's matrices into uniforms each frame.
>
> If that wasn't the problem, you'll have to be more clear. What do you mean
> by "a shader which isn't working"? How is it not working?
>
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Alexandre AMALRIC                   Ingénieur R&D
===================================
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to