Add ALS prodecural lights compatible pointing_x, pointing_y, pointing_z. You can now use the same direction vector for both ALS and the Compositor lights
This commit is contained in:
parent
76f1ffa269
commit
a6624b8c89
@ -265,6 +265,11 @@ void SGLight::configure(const SGPropertyNode *configNode)
|
||||
dirNode->getFloatValue("lookat-z-m"));
|
||||
osg::Vec3 dir = lookAt - pos;
|
||||
r.makeRotate(osg::Vec3(0, 0, -1), dir);
|
||||
} else if (dirNode->hasValue("pointing_x")) { // ALS compatible
|
||||
r.makeRotate(osg::Vec3(0, 0, -1),
|
||||
osg::Vec3(-dirNode->getFloatValue("pointing_x"),
|
||||
-dirNode->getFloatValue("pointing_y"),
|
||||
-dirNode->getFloatValue("pointing_z")));
|
||||
} else {
|
||||
r.makeRotate(osg::Vec3(0, 0, -1),
|
||||
osg::Vec3(dirNode->getFloatValue("x"),
|
||||
|
Loading…
Reference in New Issue
Block a user