[osg-users] OS X 10.9 Mavericks shaders problem

2014-06-25 Thread michael kapelko
Hi. I get the following errors when running my OSG app on OS X which runs perfectly fine on Linux: FRAGMENT glCompileShader "" FAILED FRAGMENT Shader "" infolog: ERROR: 0:67: Incompatible types (vec4 and float) in assignment (and no available implicit conversion ) glLinkProgram "" FAILED Program

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-26 Thread Sebastian Messerschmidt
Hi Michael, The shader code seems indeed to be faulty and I found the errors generated quite appropriate. Maybe your driver in the Linux is quite sloppy and uses some extensions. Nvidia for instance allows all sort of non-standard functions ( hlsl saturate etc.) I usually use ATI Shader Analyz

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-27 Thread michael kapelko
I've researched deeper into my normal maps not working after fixing those shader errors that have been reported under OS X, and found out that in my pass1VS ( http://goo.gl/sT7m7n ) Tangent attribute is always (0, 0, 0). I get it from osgUtil::TangentSpaceGenerator. Any clues? Thanks. 2014-06-26

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-27 Thread Sebastian Messerschmidt
Hi Michael, can you show the code calling the TSG and assigning the vertex attributes? Usually you will have to to a high vertex attribute like 7 or 8, since the lower numbers are mapped to the fixed function pipeline attributes. I can check my code when I'm on my development machine again. Whi

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-27 Thread michael kapelko
Here's my wrapper TSGVisitor class: http://goo.gl/Hd0WwJ And I use ID=6 for the attribute. I'll try 7 and 8. 2014-06-28 1:28 GMT+07:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi Michael, > > can you show the code calling the TSG and assigning the vertex attributes? > Usuall

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-27 Thread michael kapelko
I tried 7, 8, 9. 8 looked even more broken than before (looked like it was used by some predefined attribute). 7 and 9 were (0, 0, 0) again. 2014-06-28 1:34 GMT+07:00 michael kapelko : > Here's my wrapper TSGVisitor class: http://goo.gl/Hd0WwJ > And I use ID=6 for the attribute. > I'll try 7 and

Re: [osg-users] OS X 10.9 Mavericks shaders problem

2014-06-27 Thread michael kapelko
It turned out that I was not calling osg::Program::addBindAttribLocation to bind "Tangent" to "6". Somehow it worked fine under Linux. Now it works under OS X, too. 2014-06-28 1:58 GMT+07:00 michael kapelko : > I tried 7, 8, 9. > 8 looked even more broken than before (looked like it was used by