[osg-users] Scale problem while transforming object in vertex shader

Yura Ivanov dev3d at protonmail.com
Sat Apr 15 09:26:24 PDT 2017


Hi,

I have a transform matrix and I want to apply it in shader. I pass it into uniform and set gl_Position = gl_ModelViewProjectionMatrix*my_transfrom_matrix*gl_Vertex. 
If I set translate only, everything is ok. If I set translate and scale - translate multiplies by scale and transform is wrong (object is too far if scale>1.0). If I apply this transform not using shader (by SetMatrix) everything is ok. What I am doing wrong?


Thank you!

Cheers,
Yura

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70768#70768








More information about the osg-users mailing list