Skip to content

Conversation

@nikitavbv
Copy link
Collaborator

No description provided.


@Override
public double illuminate(Vector3 normal, double distance) {
return intensity() / (4 * Math.PI * Math.pow(distance, 2));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value need to be multiply by cos or in other words by Math.max(intensity() * normal.dotProduct(getTransform().rotation().multiply(-1)), 0) as for DistantLigth.

@Brookoko Brookoko merged commit 4f42114 into dev Jun 12, 2019
@Brookoko Brookoko deleted the shading branch June 12, 2019 05:58
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

Successfully merging this pull request may close these issues.

3 participants