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

eyden-tracer-05 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sabyrrakhim06
Copy link

No description provided.

Copy link
Contributor

@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.

I susupect plagiarism for problems 2 and 3.

return Vec2f::all(0.5f);
// n - number of samples
int n = getNumSamples();
float i = ((s % n) + 0.5) / float(sqrt(n));
Copy link
Contributor

Choose a reason for hiding this comment

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

here you need to use sort(n) instead of n

float ei = Random::U<float>();
float ej = Random::U<float>();

float i = ((s % n) + ei) / float(sqrt(n));
Copy link
Contributor

Choose a reason for hiding this comment

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

here you need to use sqrt(n) instead of n

@@ -39,7 +39,31 @@ class CLightArea : public CLightOmni
virtual std::optional<Vec3f> illuminate(Ray& ray) override
{
// --- PUT YOUR CODE HERE ---
return std::nullopt;
Vec2f sample(0, 0);
size_t k = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

it will be all the time 0
You need to make it static or member variable to save the state over the different calls of the function

@@ -27,17 +27,55 @@ class CShaderGlossy : public CShaderPhong {
virtual Vec3f shade(const Ray& ray) const override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suspection on plagiarism

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.

2 participants