Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-09 Thread Solkar Graphics
ttaw wrote: > The world coord you mentioned is cooresponding to the earth view, but the > world coord I calculate by osg::computeLocalToWorld function is not for earth > view. osg::computeLocalToWorld is about ModelMatrices, not about ViewMatrices. ttaw wrote: > For some purpose, I want the

[osg-users] Re?? how to get the real world coordinates(x, y,z) in shader

2014-07-09 Thread ttaw
Sorry for my English.I meant that those two coords should be corresponding to a single coordinate system, either local coord system or world coord system or view coord system would be ok-- Original -- From: "Solkar Graphics" Date: Wed, Jul 9, 2014 05:49 PM To: "osg

Re: [osg-users] Programming model for layers above and below the SG

2014-07-09 Thread Sonya Blade
Hi Solkar Graphics, Please forgive my curiousity, I really wonder what you want to build and I'm pretty new to the OSG library. Along with that, your question has aroused couple of question in my mind, I'll appreciate if you express your comments and opinion. Bcoz in cases where I don't understa

[osg-users] osg::notify + \n does not work

2014-07-09 Thread Per Nordqvist
Hi Robert & all, When I run the program below I only see notice 2+3. When I uncomment the 4th notice they all appear but in order 2314. So it seems that osg::notify waits for a std::endl to flush, but shouldn't \n do the job as well? (I am on xubuntu 12.04, OSG 3.0.1, OSG_NOTIFY_LEVEL=NOTICE) Th

Re: [osg-users] Access vertexes of a 3D model in the vertex shader

2014-07-09 Thread ying song
Hi Sebastian, At first I transformed from the camera coordinate system [Xc,Yc,Zc] to the pinhole image projecting system [X=Xc/Zc, Y=Yc/Zc]. Then the distorting is processed based [X,Y]. At last, the projection matrix is mutiplied and the pixel coordinate is getten in this way. Since the input

Re: [osg-users] Access vertexes of a 3D model in the vertex shader

2014-07-09 Thread ying song
Hello, Could you tell me what do you mean "define a mapping from vertex numbers to st coordinate"? Could I do like this in the fragment shader? gl_TexCoord[0].st = vec2(position.x, position.y); gl_FragColor = texture2D(myTexture, gl_TexCoord[0].st); where position is the distorted pixel coordi

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-09 Thread Solkar Graphics
ttaw wrote: > Sorry for my English.I meant that those two coords should be corresponding to > a single coordinate system, either local coord system or world coord system > or view coord system would be ok Which "two vectors"? In any case, given two vectors expressed in coords of different ref

Re: [osg-users] Access vertexes of a 3D model in the vertex shader

2014-07-09 Thread Solkar Graphics
Becky wrote: > Could you tell me what do you mean "define a mapping from vertex numbers to > st coordinate"? Could I do like this in the fragment shader? Hi Becky! The question of yours I was referring to was Becky wrote: > Would someone tell me how to access all the vertexes of a 3d model in

Re: [osg-users] Programming model for layers above and below the SG

2014-07-09 Thread Solkar Graphics
Bacttrack wrote: > Please forgive my curiousity, Hi Backtrack! Curiosity is generally welcome, but this Bacttrack wrote: > > For the (above SG) scenario: > Since OSG is open source and every class and structure is in the source code, > why would you want to build middleware layer for that?

Re: [osg-users] Apple Retina Display Not Perfect

2014-07-09 Thread Jason Beverage
Hi Michael, I wouldn't imagine osgEarth is causing the issue. I'd try running just a regular OSG application and see if it has the same issue just to be sure though. Jason On Tue, Jul 8, 2014 at 6:59 PM, Michael Rice wrote: > Hi, > > I'm using OSG 3.3.2, osgEarth 2.5.0, and Qt 5.3.0 on OS X