Re: [osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-10 Thread Robert Osfield
Hi Rômulo, On 8 November 2017 at 21:46, Rômulo Cerqueira wrote: > thanks for your replies. I will have a look on osg::TangentSpaceVisitor, > however I have a question: I will have in my OSG scene a lot of objects > with/without normal mapping. How can I handle

Re: [osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-08 Thread Rômulo Cerqueira
Hi Jordi and Sebastian, thanks for your replies. I will have a look on osg::TangentSpaceVisitor, however I have a question: I will have in my OSG scene a lot of objects with/without normal mapping. How can I handle different normal textures using the same osg::TangentSpaceVisitor? ... Thank

Re: [osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-08 Thread Jordi Torres
Ouch bad link: https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/gles/TangentSpaceVisitor.cpp#L46 this one is the right one! 2017-11-08 9:19 GMT+01:00 Jordi Torres : > Hi Romulo, > > You can use TangentSpaceGenerator to get the values of the T

Re: [osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-08 Thread Jordi Torres
Hi Romulo, You can use TangentSpaceGenerator to get the values of the T B and N. Here you have a code example: https://github.com/sketchfab/osg/blob/5d35b2a2d55e92b4c736ea5edcd9eeedf9ea6786/src/osgPlugins/gles/TangentSpaceVisitor.cpp#L46 Cheers. 2017-11-07 21:48 GMT+01:00 Rômulo Cerqueira

Re: [osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-08 Thread Sebastian Messerschmidt
Hi Rômulo, Hi, I have used normal mapping using GLSL and OSG for my application (an imaging sonar simulation) and I got problems by calculating the TBN matrix on shaders. The normal vectors contain lower resolution on border in comparison with the center of image. You cannot get a valid

[osg-users] TBN Matrix for Normal Mapping - OSG and GLSL

2017-11-07 Thread Rômulo Cerqueira
Hi, I have used normal mapping using GLSL and OSG for my application (an imaging sonar simulation) and I got problems by calculating the TBN matrix on shaders. The normal vectors contain lower resolution on border in comparison with the center of image. Follows my vertex code: Code: