Skip to content

Commit

Permalink
Correct area light sampling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Enigmatisms committed May 27, 2024
1 parent 3ab9c8f commit 1b790e0
Show file tree
Hide file tree
Showing 30 changed files with 1,608 additions and 301 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Since I have no intention making this a extensive project (like AdaPT, taking ca
|Depth Renderer|Unidirection PT|
|:--:|:--:|
|![](assets/depth-render.png)|![](assets/pt-render.png)|
|![](assets/render-balls.png)|![](assets/render-bunny.png)|

- [ ] CUDA texture bindings (with normal or UV maps)
- [ ] GPU side BVH implementation. This will be the most difficult part, since "it is always easy to write your program with parallelism, but difficult to make it fast".
Expand Down
2 changes: 1 addition & 1 deletion app/pt_renderer.cu
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char** argv) {

PathTracer pt(scene.objects, scene.shapes, vert_data, norm_data, uvs_data, 1, scene.config.width, scene.config.height);
printf("Prepare to render the scene... [%d] bounces, [%d] SPP\n", scene.config.max_depth, scene.config.spp);
auto bytes_buffer = pt.render(scene.config.spp, scene.config.max_depth);
auto bytes_buffer = pt.render(scene.config.spp, scene.config.max_depth, scene.config.gamma_correction);

std::string file_name = "render.png";

Expand Down
Binary file added assets/render-balls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/render-bunny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Blender v2.82 (sub 7) OBJ File: ''
# Blender 4.1.1
# www.blender.org
o cbox_back.001
v 5.496000 -0.000000 5.592000
v 0.000000 -0.000000 5.592000
v 5.496000 0.000000 5.592000
v 0.000000 0.000000 5.592000
v 0.000000 5.487999 5.592000
v 5.560000 5.487999 5.592000
vn 0.0000 0.0000 -1.0000
vn -0.0000 -0.0000 -1.0000
s 0
f 1//1 3//1 4//1
f 1//1 2//1 3//1
Loading

0 comments on commit 1b790e0

Please sign in to comment.