From 1ca1d31482523927d07559b4bb1166334d259c95 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 19 Oct 2009 08:58:52 +0000 Subject: [PATCH] Fixed computation of osg_NormalMatrix --- src/osg/State.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 04b18114d..94dc34fba 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -1238,27 +1238,15 @@ void State::updateModelViewAndProjectionMatrixUniforms() if (_modelViewProjectionMatrixUniform.valid()) _modelViewProjectionMatrixUniform->set((*_modelView) * (*_projection)); if (_normalMatrixUniform.valid()) { -#if 0 Matrix mv(*_modelView); mv.setTrans(0.0, 0.0, 0.0); Matrix matrix; matrix.invert(mv); -#else - Matrix matrix = *_modelView; -#endif -#if 0 Matrix3 normalMatrix(matrix(0,0), matrix(1,0), matrix(2,0), matrix(0,1), matrix(1,1), matrix(2,1), matrix(0,2), matrix(1,2), matrix(2,2)); -#else - Matrix3 normalMatrix(matrix(0,0), matrix(0,0), matrix(0,0), - matrix(1,0), matrix(1,1), matrix(1,0), - matrix(2,0), matrix(2,0), matrix(2,2)); -#endif - - osg::notify(osg::NOTICE)<<"modelview "<<*_modelView<set(normalMatrix); }