OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osg_ViewMatrix, osg_ViewMatrixInverse etc. with stereo


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
hybr
Appreciator


Joined: 26 Jun 2009
Posts: 454

PostPosted: Fri Feb 26, 2010 5:42 pm    Post subject:
osg_ViewMatrix, osg_ViewMatrixInverse etc. with stereo
Reply with quote

Hi,
Seems like built in osg glsl uniforms like osg_ViewMatrix, osg_ViewMatrixInverse projection etc doesn't reflect changes to view and projection matrices with split\interlaced stereo modes( where view shifted and\or projection sheared depending on current eye ).
Is there any convenient way to get correct view matrix (and inverted one) directly in shader or during cull\draw traversal with stereo turned on?

Thank you!

Cheers,
Sergey
Back to top
View user's profile Send private message
bellit
Newbie


Joined: 28 Jan 2010
Posts: 3

PostPosted: Thu May 04, 2017 2:26 pm    Post subject:
Re: osg_ViewMatrix, osg_ViewMatrixInverse etc. with stereo
Reply with quote

Hi,
I have the same problem, I rely heavily on the osg_ViewMatrixInverse in my shaders to calculate the Camera Position, but in Stereo Mode, all results are getting messed up.

also adding
this->getCamera()->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(true);
this->getCamera()->getGraphicsContext()->getState()->setUseVertexAttributeAliasing(true);

to the Views of the Windows does not change the behaviour in Stereo Mode.

Kind Regards,
Tobias

hybr wrote:
Hi,
Seems like built in osg glsl uniforms like osg_ViewMatrix, osg_ViewMatrixInverse projection etc doesn't reflect changes to view and projection matrices with split\interlaced stereo modes( where view shifted and\or projection sheared depending on current eye ).
Is there any convenient way to get correct view matrix (and inverted one) directly in shader or during cull\draw traversal with stereo turned on?

Thank you!

Cheers,
Sergey
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Unstable passive stereo on Quadro usi... ZJ Tian General 7 Tue Nov 15, 2016 9:41 am View latest post
No new posts Stereo View and makeLookAt() Andreas Goebel General 2 Thu Oct 06, 2016 3:18 pm View latest post
No new posts nVidia HW: Lens Matched Shading, Sing... cbuchner1 General 3 Thu Jun 09, 2016 10:02 am View latest post
No new posts Advise on SLI dual quad buffered ster... Tedzini General 3 Sat Feb 27, 2016 1:00 am View latest post
No new posts Interesting new GL extension for ster... Jan Ciger General 0 Wed Apr 29, 2015 1:11 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP