Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gkjohnson opened this issue Nov 25, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@gkjohnson
Copy link
Owner

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.

@gkjohnson gkjohnson added the bug Something isn't working label Nov 25, 2022
@gkjohnson gkjohnson added this to the v0.0.9 milestone Nov 25, 2022
@gkjohnson gkjohnson modified the milestones: v0.0.9, v0.0.8, v0.0.x Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant