Closed YHLpuyu closed 1 month ago
You might need to try the osgEarth lighting function, which supports the shaders used for the sky model. Something like:
#include <osgEarth/Lighting>
osgEarth::Lighting::set(stateSet, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);
thanks, that works. now the polygon is pure .
hi, i meet a problem that when i set no light effect in a root node of![image](https://github.com/gwaldron/osgearth/assets/8923933/f364ace1-e0c0-4022-ba41-333b587c0463)
FeatureModelLayer
, the polygon in layer is still with some dark region, like the polygon has been rendered with light. but I want there is no light effect Is your feature request related to a problem? Please describe. when setSimpleSkyNode->getSunLight()->setAmbient(0,0,0,1)
, and setfeaturemodellayer.getnode()
is light off, the polygon in featuremodelayer alwasy has dark area. the polygon is effected by sunlight. how can i get pure color in polygonDescribe the solution you'd like when set
layer->getNode()->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED);
, the polygon should has pure color, with no dark, like all gray color. below are some test code, just use the boston buildingsthe reason that i set ambient is when there have some layer with
extrusionsymbol
it render effect can be clear, when the face is facing the direction of light is lighter, and others is darker.