From Wojciech Lewandowski, "Attached is modified osgShadow::ShadowMap. I changed following things:   1: Shadow map camera sets ABSOLUTE_RF_INHERIT_VIEWPOINT refernce frame.    2: Light Direction  by matrix multiplications replaced with transform3x3 multiplication.   3: I made DebugingHUD functional by adding special draw callback. Former version was simply drawing pale square.    4: I was tempted to make 4 th change but decided to not do it. Instead I put it whith #if VIEW_DEPNDENT_TEXGEN. If you decide you may let it go.   When objects are not centered at 0,0,0 coord but in some distant location (for example at surface of earth ellipsoid) shadow texgen suffers from inadequate precision of float matrices. I changed that by premultiplying Texgen matrix (using OSG double matrices) with inverse modelview and applying it later with ModelView identity matrix. This tweak may be appropriate for OverlayNode texgen as well.   I left former version because I suspect that this change will make osgShadow::ShadowMap view dependant. Currently texgen matrix remains the same no matter what View displays it. With my change it wuld be different for each view. This touches the subject of View Dependent Shadow Techniques that J-S asked recently."
From Wojciech Lewandowski, "Attached is modified osgShadow::ShadowMap. I changed following things:
 
1:
Shadow map camera sets ABSOLUTE_RF_INHERIT_VIEWPOINT refernce frame. 
 
2:
Light Direction  by matrix multiplications replaced with transform3x3 multiplication.
 
3:
I made DebugingHUD functional by adding special draw callback. Former version was simply drawing pale square. 
 
4:
I was tempted to make 4 th change but decided to not do it. Instead I put it whith #if VIEW_DEPNDENT_TEXGEN. If you decide you may let it go.
 
When objects are not centered at 0,0,0 coord but in some distant location (for example at surface of earth ellipsoid) shadow texgen suffers from inadequate precision of float matrices. I changed that by premultiplying Texgen matrix (using OSG double matrices) with inverse modelview and applying it later with ModelView identity matrix. This tweak may be appropriate for OverlayNode texgen as well.
 
I left former version because I suspect that this change will make osgShadow::ShadowMap view dependant. Currently texgen matrix remains the same no matter what View displays it. With my change it wuld be different for each view. This touches the subject of View Dependent Shadow Techniques that J-S asked recently."


ghub/osg,stmh/osg,XiaoCC/osg,omega-hub/osg,koshman86/osg,koshman86/osg,stmh/osg,XiaoCC/osg,artoolkit/osg,ntoand/osg,ghub/osg,omega-hub/osg,omega-hub/osg,artoolkit/osg,omega-hub/osg,ntoand/osg,XiaoCC/osg,stmh/osg,koshman86/osg,XiaoCC/osg,ghub/osg,koshman86/osg,artoolkit/osg,ntoand/osg,stmh/osg,XiaoCC/osg,ntoand/osg,ghub/osg,stmh/osg,artoolkit/osg