TAA was on. Same thing with TAA off though. TSR is off.
Deferred and Forward same thing.
This also happens when just orbiting/panning the camera.
Interesting is that this happens only with the shadows from the point light.
directional light is fine.
The dark shadow here is from the LightDir.
The other one from LightPoint.
This shadow glitch occurs on geometry without any code (parented to terrain)
as well though. So not sure about any errors in code.
Checked the size of the light as well, doesn't make any difference.
I'll see what else I can find.
The code:
Code:
void StaticGeo::create(Object &obj)
{
super.create(obj);
scale = obj.scale3();
mesh = obj.mesh();
phys = obj.phys();
phys->density=0;
_matrix = obj.matrixFinal().normalize();
_scaledMatrix = _matrix;
_scaledMatrix.scaleOrnL(scale);
if(phys)
{
actor.create(*phys, 1, true).matrix(_matrix);
actor.obj(this);
}
}
Bool StaticGeo::update()
{
return 1;
}
UInt StaticGeo::drawPrepare()
{
if(mesh) mesh->draw(actor.matrix());
return 1;
}
void StaticGeo::drawShadow()
{
if(mesh) mesh->drawShadow(actor.matrix());
}