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

1.5 Casting Shadows #62

Open
mafshar opened this issue Oct 12, 2017 · 1 comment
Open

1.5 Casting Shadows #62

mafshar opened this issue Oct 12, 2017 · 1 comment

Comments

@mafshar
Copy link

mafshar commented Oct 12, 2017

Hi!

Regarding casting shadows to our scene, I am a little confused about the implementation of it, and I'm not sure how to go about it.

Thank you in advance!

@danielepanozzo
Copy link
Owner

Without shadows, you need to find a collision with an object, and then iterate over all the lights in the scene to add their contribution to the color. With shadows, before summing up the contribution of each light, you have to cast a shadow ray to check if the light is visible at the collision point. If it is visible you add the contribution, if it is not visible you skip it. Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants