Skip to content

Commit

Permalink
Fixed the transparent shadow feature with specular materials
Browse files Browse the repository at this point in the history
  • Loading branch information
Dade916 committed Jul 5, 2020
1 parent 10d976f commit e2b61cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -776,7 +776,7 @@ __kernel void AdvancePaths_MK_GENERATE_NEXT_VERTEX_RAY(
} else {
const float3 shadowTransparency = BSDF_GetPassThroughShadowTransparency(bsdf
MATERIALS_PARAM);
if (!sampleResult->firstPathVertex && !Spectrum_IsBlack(shadowTransparency)) {
if (!sampleResult->firstPathVertex && !Spectrum_IsBlack(shadowTransparency) && !pathInfo->isNearlyS) {
sampledDir = -VLOAD3F(&bsdf->hitPoint.fixedDir.x);
bsdfSample = shadowTransparency;
bsdfPdfW = pathInfo->lastBSDFPdfW;
Expand Down
2 changes: 1 addition & 1 deletion src/slg/engines/pathtracer.cpp
Expand Up @@ -570,7 +570,7 @@ void PathTracer::RenderEyePath(IntersectionDevice *device,
}
} else {
const Spectrum &shadowTransparency = bsdf.GetPassThroughShadowTransparency();
if (!sampleResult.firstPathVertex && !shadowTransparency.Black()) {
if (!sampleResult.firstPathVertex && !shadowTransparency.Black() && !pathInfo.IsSpecularPath()) {
sampledDir = -bsdf.hitPoint.fixedDir;
bsdfSample = shadowTransparency;
bsdfPdfW = pathInfo.lastBSDFPdfW;
Expand Down

0 comments on commit e2b61cb

Please sign in to comment.