Skip to content

Cast Shadows Flag: MIS sampling needs to determine the shadow ray from the env sample direction rather than new sample #300

Open
@gkjohnson

Description

@gkjohnson

Related to #274

See here:

vec3 attenuatedColor;
if (
envPdf > 0.0 &&
isDirectionValid( envDirection, normal, faceNormal ) &&
! attenuateHit( bvh, rayOrigin, envDirection, bounces - i, isShadowRay, attenuatedColor )
) {
// get the material pdf
vec3 sampleColor;
float envMaterialPdf = bsdfResult( outgoing, clearcoatOutgoing, normalize( invBasis * envDirection ), normalize( clearcoatInvBasis * envDirection ), surfaceRec, sampleColor );
bool isValidSampleColor = all( greaterThanEqual( sampleColor, vec3( 0.0 ) ) );
if ( envMaterialPdf > 0.0 && isValidSampleColor ) {

Maybe it makes sense to be able to determine the specular PDF without getting the full set of material properties.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions