Skip to content

SampleDistantLight: normal setting makes wrong shadow #99

@cedarz

Description

@cedarz

In DirectLight, as the comment says, lightSample.normal is required for quad light.

if (dot(lightSample.direction, lightSample.normal) < 0.0) // Required for quad lights with single sided emission

for distant light, if the position is not high(in y axis) enough, there will be wrong shadow cast on the scene plane, such as teapot.scene.

Image

Changing the lightSample.normal compution from

lightSample.normal = normalize(scatterPos - light.position);

to

lightSample.normal = -lightSample.direction;

maybe one solution that bypasses the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions