Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/SHADING.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ int SURFGEOM::gx_CalcBeamShading( // beam shading for current hour
else
{ float PSSF = PUMBRA( calculatePSSF)( gx_pnIdx);
fBeam = PSSF / (cosi*gx_area);
// PUMBRA(renderScene)(gx_pnIdx);

if (fBeam > 1.f)
{
#if 1
if (fBeam > 1.05f && cosi > .01f)
{ if (fBeam > 1.05f && cosi > .01f)
{ // report some errors > 5% and all errors > 10%
// ignore if low sun angles
static const int MAXFBEAMMSGS = 20;
Expand All @@ -603,10 +603,9 @@ int SURFGEOM::gx_CalcBeamShading( // beam shading for current hour
: "";
rWarn( "%s: calculated sunlit fraction (=%0.4f) s/b <= 1.%s",
gx_pParent->classObjTx( 1), fBeam, noMore);
PUMBRA(renderScene)(gx_pnIdx);
// PUMBRA(renderScene)(gx_pnIdx);
}
}
#endif
fBeam = 1.; // limit to 1
}
// round to nearest thousandth to minimize pixel precision
Expand Down Expand Up @@ -700,7 +699,8 @@ static void PenumbraMessageHandler(
RC TOPRAT::tp_PumbraInit()
{ RC rc = RCOK;
if (!tp_pPumbra)
{ const int size = 512; // context size (=# of pixels)
{ const int size = 4096; // context size (=# of x and y pixels of gpu buffer)
// 500->4096 1-2019 after inaccurate cases found
tp_pPumbra = new Pumbra::Penumbra( PenumbraMessageHandler, this, size);
if (!tp_pPumbra)
rc = RCBAD; // not expected
Expand Down
Loading