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

Added scene with Lambertian and Metal materials #7

Merged
merged 10 commits into from
Aug 14, 2024
Merged

Conversation

soumyasen1809
Copy link
Owner

- Added utility functions to generate random vectors.
This will simulate the random light rays bouncing off the
sphere.
- Determine if ray is on the correct hemisphere by comparing
against the surface normal
- Limiting number of child rays.
The ray_color function is recursive. When will it stop recursing?
When it fails to hit anything. In some cases, however, that may
be a long time — long enough to blow the stack.
To guard against that, limited the maximum recursion depth,
returning no light contribution at the maximum depth.

%SOFTWARE
- Ignore points close to the calculated intersection
point.
- Uses interval min as 0.01 instead of 0.0

%SOFTWARE
We want to select the tangent unit sphere that is on
the same side of the surface as the ray origin.
Pick a random point S point P on this unit radius sphere
and send a ray from the hit to the random point S

- Added random unit vector to the sphere ray color

%SOFTWARE
It is likely that the image viewer you are using is expecting
an image in gamma space, but we are giving it an image in
linear space. This is the reason why our image appears
inaccurately dark. Hence we use Gamma correction for
accurate color intensity.
- Added linear space to gamma space correction
(Gamma 2)

%SOFTWARE
- Issue in color of the spheres

%SOFTWARE
- Bug No change in pic generated

%SOFTWARE
- Removed extra HittableObject

%SOFTWARE
- Added metal spheres to the scene
- Pass world as a Vec<Box<dyn Hittable>> to Camera

%SOFTWARE
Fixes Issue #6
@soumyasen1809 soumyasen1809 added the enhancement New feature or request label Aug 14, 2024
@soumyasen1809 soumyasen1809 self-assigned this Aug 14, 2024
@soumyasen1809 soumyasen1809 merged commit 75a339c into main Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant