[osg-users] How to translate the light posiotion from world space to eye space in glsl

2008-09-08 Thread guilianzhang
Hi, To make phong shading using shaders(in GLSL), I have to pass the the light position to the vertex shader, But the position of the vertex will be in eyespace (after multiplication with the ModelView matrix). So I need the light position in eye-space as well. Which is the best way of

[osg-users] How does each object set its own light parameters?

2008-08-28 Thread guilianzhang
by adding a osg::LightSource, and the LightSource node then is added to the scene graph, Must I add LightSources for each object to set its own light parameters? Is there any better method? Thanks very much! guilianzhang 2008-08-28 ___ osg-users

[osg-users] How to control RTT camera sometimes work and sometimes don't work

2008-07-02 Thread guilianzhang
be destroyed instantly? If the texture will be destroyed, how can I save the data of MRT to images for I will use these data every frame in the later pass? Are there any method that make the MRT data avoid being destroyed instead of copy those data to images? Thanks very much! guilianzhang 2008-07-03

[osg-users] Which matrix decides the world position of the vertex

2008-07-01 Thread guilianzhang
not the world position of the vertex. Any informations about this will be appreciated. Thanks very much for your help! guilianzhang 2008-07-01 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg

[osg-users] World position of the vertex

2008-06-29 Thread guilianzhang
in the form of gl_ModelViewMatrix. Thanks very much! guilianzhang 2008-06-29 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] The sceneview data is cleared up when restore the minimized programs

2008-06-01 Thread guilianzhang
don't know this problem has relationship with what and how to solve this problem, any suggestions would be appreciated. Thanks. guilianzhang 2008-06-02 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org

Re: [osg-users] Getting world space normal

2008-05-27 Thread guilianzhang
to be no inverse and transpose funtions in glsl. Thank you very much! guilianzhang 2008-05-28 发件人: Mike Weiblen 发送时间: 2008-05-28 01:36:52 收件人: OpenSceneGraph Users 抄送: 主题: Re: [osg-users] Getting world space normal Well, not so much a requirement as OpenGL convention. GL defines a normal