-
Notifications
You must be signed in to change notification settings - Fork 22
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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)); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suspection on plagiarism
No description provided.