Skip to content

Commit 2ef88fd

Browse files
committed
custom aperture mask for DOF
1 parent 1cc34f7 commit 2ef88fd

File tree

15 files changed

+164
-44
lines changed

15 files changed

+164
-44
lines changed

img/aperture.jpg

144 KB
Loading

img/aperture_custom.jpg

150 KB
Loading

img/aperture_off.jpg

287 KB
Loading

scenes/aperture.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Camera
2+
Resolution 1800 1350
3+
FovY 20.5
4+
LensRadius 0.39
5+
FocalDist 10.8
6+
ApertureMask Null
7+
Sample 3000
8+
Depth 8
9+
File Cornell
10+
Eye 5.817 -2.796 9.069
11+
Rotation 232.378 10.823 0
12+
Up 0 1 0
13+
14+
EnvMap texture/moonless_golf_4k.hdr
15+
16+
Material Glass
17+
Type Dielectric
18+
BaseColor 1 1 1
19+
Metallic 0
20+
Roughness 0
21+
Ior 1.5
22+
NormalMap Null
23+
24+
Object Sphere
25+
model/sphere40.obj
26+
Material Glass
27+
Translate 0 0 0
28+
Rotate 0 0 0
29+
Scale 2 2 2

scenes/cornell.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Resolution 1280 960
33
FovY 22
44
LensRadius 0.1
55
FocalDist 11
6+
ApertureMask Null
67
Sample 5000
78
Depth 8
89
File Cornell

scenes/env_map.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Resolution 1800 1350
33
FovY 40
44
LensRadius 0
55
FocalDist 11
6+
ApertureMask Null
67
Sample 5000
78
Depth 8
89
File Cornell

scenes/pbr_texture.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Resolution 1600 1200
33
FovY 5.5
44
LensRadius 0.03
55
FocalDist 8.4
6+
ApertureMask Null
67
Sample 3000
78
Depth 8
89
File Cornell
25.4 MB
Binary file not shown.

scenes/texture/star3.jpg

25.3 KB
Loading

src/common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
#define ENABLE_GBUFFER false
1111

12+
#define CAMERA_PANORAMA false
13+
14+
#define CAMERA_APERTURE_MASK false
15+
1216
struct ToneMapping {
1317
enum {
1418
None = 0, Filmic = 1, ACES = 2

0 commit comments

Comments
 (0)