Changed the AbmientBias type from Vec2d to Vec2 as use of double is inappropriate.
This commit is contained in:
@@ -100,10 +100,10 @@ class OSGSHADOW_EXPORT ParallelSplitShadowMap : public ShadowTechnique
|
||||
inline const osg::Light* getUserLight() const { return _userLight; }
|
||||
|
||||
/** Set the values for the ambient bias the shader will use.*/
|
||||
void setAmbientBias(const osg::Vec2d& ambientBias );
|
||||
void setAmbientBias(const osg::Vec2& ambientBias );
|
||||
|
||||
/** Get the values for the ambient bias the shader will use.*/
|
||||
const osg::Vec2d& getAmbientBias() const { return _ambientBias; }
|
||||
const osg::Vec2& getAmbientBias() const { return _ambientBias; }
|
||||
|
||||
/**
|
||||
* you can overwrite the fragment shader if you like to modify it yourself, own fragment shader can be used
|
||||
@@ -190,7 +190,7 @@ class OSGSHADOW_EXPORT ParallelSplitShadowMap : public ShadowTechnique
|
||||
|
||||
bool _debug_color_in_GLSL;
|
||||
|
||||
osg::Vec2f _polgyonOffset;
|
||||
osg::Vec2 _polgyonOffset;
|
||||
bool _user_polgyonOffset_set;
|
||||
|
||||
unsigned int _resolution;
|
||||
@@ -209,7 +209,7 @@ class OSGSHADOW_EXPORT ParallelSplitShadowMap : public ShadowTechnique
|
||||
SplitCalcMode _SplitCalcMode;
|
||||
|
||||
osg::Uniform* _ambientBiasUniform;
|
||||
osg::Vec2d _ambientBias;
|
||||
osg::Vec2 _ambientBias;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ ParallelSplitShadowMap::ParallelSplitShadowMap(osg::Geode** gr, int icountplanes
|
||||
_userLight(NULL),
|
||||
_GLSL_shadow_filtered(true),
|
||||
_ambientBiasUniform(NULL),
|
||||
_ambientBias(0.1,0.3)
|
||||
_ambientBias(0.1f,0.3f)
|
||||
{
|
||||
_displayTexturesGroupingNode = gr;
|
||||
_number_of_splits = icountplanes;
|
||||
@@ -275,7 +275,7 @@ ParallelSplitShadowMap::ParallelSplitShadowMap(const ParallelSplitShadowMap& cop
|
||||
{
|
||||
}
|
||||
|
||||
void ParallelSplitShadowMap::setAmbientBias(const osg::Vec2d& ambientBias)
|
||||
void ParallelSplitShadowMap::setAmbientBias(const osg::Vec2& ambientBias)
|
||||
{
|
||||
_ambientBias = ambientBias;
|
||||
if (_ambientBiasUniform ) _ambientBiasUniform->set(osg::Vec2f(_ambientBias.x(), _ambientBias.y()));
|
||||
|
||||
@@ -16,7 +16,7 @@ REGISTER_OBJECT_WRAPPER( osgShadow_ParallelSplitShadowMap,
|
||||
ADD_DOUBLE_SERIALIZER( MoveVCamBehindRCamFactor, 0.0 ); // _move_vcam_behind_rcam_factor
|
||||
ADD_DOUBLE_SERIALIZER( MinNearDistanceForSplits, 5.0 ); // _split_min_near_dist
|
||||
ADD_OBJECT_SERIALIZER( UserLight, osg::Light, NULL ); // _userLight
|
||||
ADD_VEC2D_SERIALIZER( AmbientBias, osg::Vec2d() ); // _ambientBias
|
||||
ADD_VEC2_SERIALIZER( AmbientBias, osg::Vec2() ); // _ambientBias
|
||||
|
||||
BEGIN_ENUM_SERIALIZER2( SplitCalculationMode, osgShadow::ParallelSplitShadowMap::SplitCalcMode, SPLIT_EXP );
|
||||
ADD_ENUM_VALUE( SPLIT_LINEAR );
|
||||
|
||||
Reference in New Issue
Block a user