Fix typos and spelling.
This commit is contained in:
committed by
Robert Osfield
parent
c3008512f1
commit
02c310982e
@@ -35,7 +35,7 @@ using namespace osgShadow;
|
||||
// Unfortuantely this condition often happens in daily routine of shadow usage
|
||||
// due precision errors mixed with repeating frustum cuts performed by MinimalShadowClasses.
|
||||
// However, in most of above cases this condition is not fatal
|
||||
// because polyhedron becomes concave by very small margin (mesuring deep the hole).
|
||||
// because polyhedron becomes concave by very small margin (measuring deep the hole).
|
||||
// Unfortunately warnings are produced even for such small margin cases and can
|
||||
// easily flood the console.
|
||||
// So I leave MAKE_CHECKS commented out. Its really useful only for a guy who debugs
|
||||
@@ -479,7 +479,7 @@ void ConvexPolyhedron::transformClip(const osg::Matrix& matrix, const osg::Matri
|
||||
// This may happen if face polygon is not planar or convex.
|
||||
// It may happen when face was distorted by projection transform
|
||||
// or when some polygon vertices land in incorrect positions after
|
||||
// some transformation by badly conditioned matrix (weak precison)
|
||||
// some transformation by badly conditioned matrix (weak precision)
|
||||
|
||||
WARN
|
||||
<< "ConvexPolyhedron::transformClip - Slicing face polygon returns "
|
||||
@@ -815,7 +815,7 @@ void ConvexPolyhedron::removeDuplicateVertices( void )
|
||||
{
|
||||
#if 1
|
||||
// Aggressive removal, find very close points and replace them
|
||||
// with their average. Second step wil do the rest.
|
||||
// with their average. Second step will do the rest.
|
||||
|
||||
typedef std::map< osg::Vec3f, osg::Vec4d > PointMap;
|
||||
typedef std::set< osg::Vec3d > VertexSet;
|
||||
@@ -1392,7 +1392,7 @@ void ConvexPolyhedron::cut(const osg::Plane& plane, const std::string& name)
|
||||
// This may happen if face polygon is not planar or convex.
|
||||
// It may happen when face was distorted by projection transform
|
||||
// or when some polygon vertices land in incorrect positions after
|
||||
// some transformation by badly conditioned matrix (weak precison)
|
||||
// some transformation by badly conditioned matrix (weak precision)
|
||||
|
||||
WARN
|
||||
<< "ConvexPolyhedron::cut - Slicing face polygon returns "
|
||||
|
||||
@@ -191,7 +191,7 @@ void MinimalShadowMap::ViewData::frameShadowCastingCamera
|
||||
osg::Matrix transform = osg::Matrix::inverse( mvp );
|
||||
|
||||
// Code below was working only for directional lights ie when projection was ortho
|
||||
// osg::Vec3d normal = osg::Matrix::transform3x3( osg::Vec3d( 0,0,-1)., transfrom );
|
||||
// osg::Vec3d normal = osg::Matrix::transform3x3( osg::Vec3d( 0,0,-1)., transform );
|
||||
|
||||
// So I replaced it with safer code working with spot lights as well
|
||||
osg::Vec3d normal =
|
||||
@@ -299,7 +299,7 @@ void MinimalShadowMap::ViewData::cullShadowReceivingScene( )
|
||||
_cv->clampProjectionMatrix( _clampedProjection, n, f );
|
||||
}
|
||||
|
||||
// Aditionally clamp far plane if shadows don't need to be cast as
|
||||
// Additionally clamp far plane if shadows don't need to be cast as
|
||||
// far as main projection far plane
|
||||
if( 0 < *_maxFarPlanePtr )
|
||||
clampProjection( _clampedProjection, 0.f, *_maxFarPlanePtr );
|
||||
|
||||
@@ -104,7 +104,7 @@ std::string ParallelSplitShadowMap::FragmentShaderGenerator::generateGLSL_Fragme
|
||||
for (unsigned int i=0;i<nbrSplits;i++) {
|
||||
if (!filtered) {
|
||||
sstr << " float shadow" << i <<" = shadow2D( shadowTexture" << i <<",gl_TexCoord[" << (i+textureOffset) <<"].xyz).r;" << std::endl;
|
||||
sstr << " shadow" << i <<" = step(0.25,shadow" << i <<");" << std::endl; // reduce shadow artefacts
|
||||
sstr << " shadow" << i <<" = step(0.25,shadow" << i <<");" << std::endl; // reduce shadow artifacts
|
||||
} else {
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@ std::string ParallelSplitShadowMap::FragmentShaderGenerator::generateGLSL_Fragme
|
||||
<<" + shadow3" << i
|
||||
<< ")/6.0;"<< std::endl;
|
||||
|
||||
//sstr << " shadow" << i <<" = shadow" << i <<" * step(0.025,shadow" << i <<");" << std::endl; // reduce shadow artefacts
|
||||
//sstr << " shadow" << i <<" = shadow" << i <<" * step(0.025,shadow" << i <<");" << std::endl; // reduce shadow artifacts
|
||||
|
||||
//sstr << " float shadow02" << i <<" = (shadow0" << i <<"+shadow2" << i <<")*0.5;"<< std::endl;
|
||||
//sstr << " float shadow13" << i <<" = (shadow1" << i <<"+shadow3" << i <<")*0.5;"<< std::endl;
|
||||
//sstr << " float shadowSoft" << i <<" = (shadow02" << i <<"+shadow13" << i <<")*0.5;"<< std::endl;
|
||||
//sstr << " float shadow" << i <<" = (shadowSoft" << i <<"+shadowOrg" << i <<")*0.5;"<< std::endl;
|
||||
//sstr << " shadow" << i <<" = step(0.25,shadow" << i <<");" << std::endl; // reduce shadow artefacts
|
||||
//sstr << " shadow" << i <<" = step(0.25,shadow" << i <<");" << std::endl; // reduce shadow artifacts
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ void ParallelSplitShadowMap::init()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if ( ! _GLSL_shadow_filtered ) {
|
||||
// if not glsl filtering enabled then we should force front face culling to reduce the number of shadow artefacts.
|
||||
// if not glsl filtering enabled then we should force front face culling to reduce the number of shadow artifacts.
|
||||
osg::ref_ptr<osg::CullFace> cull_face = new osg::CullFace;
|
||||
cull_face->setMode(osg::CullFace::FRONT);
|
||||
stateset->setAttribute(cull_face.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);
|
||||
|
||||
Reference in New Issue
Block a user