Skip to content

Commit

Permalink
Merge pull request #3 from DavidBluecame/shadow_auto_bias
Browse files Browse the repository at this point in the history
Shadow auto bias
  • Loading branch information
DavidBluecame committed Apr 18, 2015
2 parents 72d48c2 + 2e0ca6d commit 7d132e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/yafraycore/scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ bool scene_t::update()
shadowBias = sceneBound.longX();
if(shadowBias < sceneBound.longY()) shadowBias=sceneBound.longY();
if(shadowBias < sceneBound.longZ()) shadowBias=sceneBound.longZ();
shadowBias = YAF_SHADOW_BIAS * shadowBias;
rayMinDist = 0.5*shadowBias;
shadowBias = YAF_SHADOW_BIAS * 0.25f * shadowBias;
rayMinDist = 0.1f * shadowBias;

Y_INFO << "Scene: total scene dimensions: X=" << sceneBound.longX() << ", Y=" << sceneBound.longY() << ", Z=" << sceneBound.longZ() << ", volume=" << sceneBound.vol() << ", calculated Shadow Bias=" << shadowBias << ", calculated Ray Min Dist=" << rayMinDist << yendl;
}
Expand Down Expand Up @@ -832,8 +832,8 @@ bool scene_t::update()
shadowBias = sceneBound.longX();
if(shadowBias < sceneBound.longY()) shadowBias=sceneBound.longY();
if(shadowBias < sceneBound.longZ()) shadowBias=sceneBound.longZ();
shadowBias = YAF_SHADOW_BIAS * shadowBias;
rayMinDist = 0.5f * shadowBias;
shadowBias = YAF_SHADOW_BIAS * 0.25f * shadowBias;
rayMinDist = 0.1f * shadowBias;

Y_INFO << "Scene: total scene dimensions: X=" << sceneBound.longX() << ", Y=" << sceneBound.longY() << ", Z=" << sceneBound.longZ() << ", volume=" << sceneBound.vol() << ", calculated Shadow Bias=" << shadowBias << ", calculated Ray Min Dist=" << rayMinDist << yendl;

Expand Down

0 comments on commit 7d132e6

Please sign in to comment.