Skip to content

Commit

Permalink
fix bright microfacet
Browse files Browse the repository at this point in the history
  • Loading branch information
FROL256 committed Nov 7, 2018
1 parent 96ba50d commit e383521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydra_drv/cmaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static inline float blinnEvalPDF(__global const PlainMaterial* a_pMat, const flo
return blinn_pdf;
}

#define BLINN_COLOR_MULT 3.0f
#define BLINN_COLOR_MULT 2.0f

static inline float3 blinnEvalBxDF(__global const PlainMaterial* a_pMat, const float3 l, const float3 v, const float3 n,
const float2 a_texCoord, __global const EngineGlobals* a_globals, texture2d_t a_tex, __private const ProcTextureList* a_ptList)
Expand Down Expand Up @@ -897,7 +897,7 @@ static inline void BlinnSampleAndEvalBRDF(__global const PlainMaterial* a_pMat,
const float GF1 = TorranceSparrowGF1(wo, wi);

const float estimatedThoroughput = cosThetaOut*(D * GF1) / fmax(blinn_pdf, DEPSILON2);
const float brightBordersMult = fmin(estimatedThoroughput, 0.5f) / fmax(estimatedThoroughput, DEPSILON2);
const float brightBordersMult = fmin(estimatedThoroughput, 0.65f) / fmax(estimatedThoroughput, DEPSILON2);

a_out->direction = newDir;
a_out->pdf = blinn_pdf;
Expand Down

0 comments on commit e383521

Please sign in to comment.