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

[old] Feature/c light spot #1

Closed
wants to merge 2 commits into from

Conversation

Takundei
Copy link
Contributor

@Takundei Takundei commented Feb 2, 2020

Added SpotLight.

Rendered Image :
Demo SpotLight

Copy link
Member

@ereator ereator left a comment

Choose a reason for hiding this comment

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

One more thing - there are some files, for example Demo Cornell Box.cpp, which were changed (i think tabs were replaced with spaces or vise versa). But changing these files does not belong to the pull request in my opinion. If merge now, that in the history of that file will be a string “Add SpotLight”, but logically these files should not be affected.
I suggest to remove them from the pull request. And if those changes are still needed, add them to another pull request (e.g. “formatting code” or smth like that)

demos/CMakeLists.txt Show resolved Hide resolved
modules/core/LightSpot.h Show resolved Hide resolved
float angle_light_ray = ray.dir.dot(m_direction);
float attenuation = 1 / (ray.t * ray.t);
float scale;
if (angle_light_ray > m_angle) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be
if (angle_light_ray < m_angle) { ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These variables are \cos of the respective angles, so the code would need to be :
if (acos(angle_light_ray) < acos(m_angle)) {

which version would you prefer ?

modules/core/LightSpot.h Show resolved Hide resolved
@Takundei Takundei changed the title Feature/c light spot 'old] Feature/c light spot Feb 4, 2020
@Takundei Takundei changed the title 'old] Feature/c light spot [old] Feature/c light spot Feb 4, 2020
@Takundei Takundei closed this Feb 4, 2020
@Takundei Takundei deleted the feature/CLightSpot branch February 7, 2020 16:12
ereator pushed a commit that referenced this pull request Mar 13, 2020
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.

None yet

2 participants