Re: [osg-users] getting correct light position

2012-03-28 Thread Sergey Polischuk
Hi check if you treat directional light in a right way (i mean use light direction instead of position and such) 28.03.2012, 13:29, "Andrey Ibe" : > Hi, > > i am doing an off-line ray-tracing. at the beginning of the computation i > fetch all the lights and then use them. > > the problem is, i a

Re: [osg-users] getting correct light position

2012-03-28 Thread Andrey Ibe
Hi and thank you for the quick suggestion. i double checked. i treat all three types of the light equally, in terms of vector mathematics. the only difference is the attenuation stuff, but these values are scalar. Cheers, Andrey -- Read this topic online here: http://forum.open

Re: [osg-users] getting correct light position

2012-04-12 Thread Andrey Ibe
Hi, update: working! ... almost correctly I have recently realized, that the problem may be caused by me not treating the fourth vector component (w) well - but if i use .project() method of either osg::Vec4d or osg::Vec4dH, it produces infinity for directional lights, which is expected, but h